Results 1 to 6 of 6
  1. #1

    help question Table Prefix question

    I'm attempting to use DealGates PHP file downloaded from this site, however I have run into a problem, When I surf to the file "dealgates_pipeline.php" I get this error

    ": SQL error Table 'MyDatabase_zc1.categories' doesn't exist| catInfo = SELECT categories.categories_id AS curCatID, categories.parent_id AS parentCatID, categories_description.categories_name AS catName FROM categories, categories_description WHERE categories.categories_id = categories_description.categories_id:"

    now in the PHP file it calls the database which is " wagnert_zc1" but then it looks for a table " categories" but its looking for the prefix of _zc1, when it actually have the prefix of "zen_".

    So how do I tell it to look for/or use the correct prefix to load the program??

    Here is a bit of the code:
    $home = "locohost" ;
    $user="MyUserName_zc1";
    $pass="XxXxXxXxXx";
    $base="MyDatabase_zc1";

    Then there is the actual call for the catorories table:
    if (!($link=mysql_connect($home,$user,$pass)))
    {
    echo "Error when connecting itself to the data base";
    exit();
    }
    if (!mysql_select_db( $base , $link ))
    {
    echo "Error the data base does not exist";
    exit();
    }

    Any SQL/PHP experts out there that can help?

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Table Prefix question

    Quote Originally Posted by Module Text
    Module originally written for oscommerce, adapted for Zen Cart.
    Module does NOT support sites with table-prefixes. If you use them, you'll have to modify the code to use your table-prefixes properly.
    Did you read the prefix caveat?
    Just downloaded it but have to look at it.
    Zen-Venom Get Bitten

  3. #3

    Default Re: Table Prefix question

    BUSTED!

    No I didn't read that, but I'm hoping there is a way around it.
    I would think you could call a database and tell it to use a prefix other than the databases.
    Second option: Removing all my prefixes on my tables. how involved would that be without loosing everything?
    I noticed that some of my tables don't have the zen_ prefix.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Table Prefix question

    I noticed that some of my tables don't have the zen_ prefix.
    This sounds problematic!!

    I do not use prefixes so you need to check your records inside the tables to see if they are also prefixed.

    In the dealgates.php file find the sql and this is part of it and I am only altering the table(first part) and not the record designation.
    How it is:
    Code:
    $sql = "
    SELECT concat( '" . $productURL . "' ,products.products_id) AS product_url,
    products_model AS prodModel, products_weight,
    manufacturers.manufacturers_name AS mfgName,
    Change all to:
    Code:
    $sql = "
    SELECT concat( '" . $productURL . "' ,zen_products.products_id) AS product_url,
    products_model AS prodModel, products_weight,
    zen_manufacturers.manufacturers_name AS mfgName,
    And so forth for all table references and record references if you find that they also have been prefixed

    And/or square away your ZC DB and remove the prefixes.
    Zen-Venom Get Bitten

  5. #5

    Default Re: Table Prefix question

    Thank You Very much!

    I'll start editing. and check into those non prefixed tables.
    Its probably all the updates and some failed mods. Definitely need to be cleaned out or repaired.

  6. #6

    Default Re: Table Prefix question

    How difficult is it to remove the Table Prefixes?
    I do have access to MYSQL, but not sure how to go about renaming my tables.
    and I guess that on line 73 in the configure.php file
    " define('DB_PREFIX', 'zen_');" should be changes to
    " define('DB_PREFIX', '');
    Is there any other files to change?

 

 

Similar Threads

  1. v154 Table Prefix
    By jolliejollie in forum Installing on a Windows Server
    Replies: 3
    Last Post: 27 Apr 2015, 01:52 AM
  2. Modify table prefix
    By thinknirmal in forum General Questions
    Replies: 3
    Last Post: 30 Apr 2008, 09:52 AM
  3. Changing Table Prefix's
    By brimsjewelry in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 30 Nov 2006, 09:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg