Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: SQL Table Error (table doesn't exist?)

    Well, it's not going to say the table doesn't exist if it's not true.

    And it's not giving you a permission-denied message, so it doesn't sound like a permissions problem.

    What's the history behind this site? Do you have several databases and several db users and several db servers etc? Or has it always only been JUST ONE and never any others?

    Also, please click Reply below and answer all the questions in the Posting Tips section on that page.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #12
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: SQL Table Error (table doesn't exist?)

    Further, I might suggest a couple code changes, for better practice.

    ie: change this:
    Code:
    		$sql_chk = " select products_id from products_3_for_2_flags where products_id = ". (int)$pid;
    to this:
    Code:
    		$sql_chk = "select products_id from " . DB_PREFIX . "products_3_for_2_flags where products_id = ". (int)$pid;
    - remove the space at the beginning of the query
    - add the DB_PREFIX
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #13
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: SQL Table Error (table doesn't exist?)

    Quote Originally Posted by plymgary1 View Post
    I'm not sure the problem is with configure.php?
    Just to be sure, could you please post the DB portion of your configure.php files (XXX out the username/password).

    Quote Originally Posted by plymgary1 View Post
    There's no other connectivity problem with the db.
    If it is pointing to a *different* database you probably *won't* notice any other 'connectivity' problems.

    This has me baffled at the moment, and I don't sleep easy when I can't explain why a software problem seems to have no logical cause.
    As the Dr. Says "it's not going to say the table doesn't exist if it's not true".

    Computers can be mysterious things, but I've never known them to actually 'lie', or even make a mistake (even though it is true that some error messages can be a little misleading, or less than helpful).

    Cheers
    Rod

  4. #14
    Join Date
    Feb 2009
    Posts
    120
    Plugin Contributions
    0

    help question Re: SQL Table Error (table doesn't exist?)

    Hello again,

    I just wanted to say thanks again for taking the time out to reply. :)

    Here's the info:

    from includes/configure.php

    Code:
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', '');
      define('DB_SERVER', 'localhost');
      define('DB_SERVER_USERNAME', 'xkwies_username');
      define('DB_SERVER_PASSWORD', 'delted for this post!');
      define('DB_DATABASE', 'xkwies_handcrafteduk');
      define('USE_PCONNECT', 'false'); // use persistent connections?
      define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage
    from admin/includes/configure.php

    Code:
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', '');
      define('DB_SERVER', 'localhost');
      define('DB_SERVER_USERNAME', 'xkwies_username');
      define('DB_SERVER_PASSWORD', 'deleted');
      define('DB_DATABASE', 'xkwies_handcrafteduk');
      define('USE_PCONNECT', 'false'); // use persistent connections?
      define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage
    It's got me stumped too!

  5. #15
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: SQL Table Error (table doesn't exist?)

    Quote Originally Posted by plymgary1 View Post
    I just wanted to say thanks again for taking the time out to reply. :)
    I love a ood mystery.
    Quote Originally Posted by plymgary1 View Post
    It's got me stumped too!
    Configs look OK.

    Worst part is, I know I've come across something like this once before.... a long time ago. I *think* it had to do with the underscore and the way the server was configured, but it was such an unlikely scenario that I haven't given it a second thought since.

    Did you try adding the DB_PREFIX as suggested by Dr.Byte?

    If that doesn't help, perhaps a few 'echo' statements conveniently placed in the script to output the current variable and CONSTANT values may be helpful.

    I'll let you know if I casn think of anthing else.

    Cheers
    Rod

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v139h SQL Error 1146 Table TABLE_CUSTOMERS_ADMIN_NOTES doesn't exist
    By utefan in forum General Questions
    Replies: 4
    Last Post: 3 Mar 2016, 07:45 PM
  2. v151 upgrading error 1146 table doesn't exist
    By scottrdj in forum Upgrading to 1.5.x
    Replies: 4
    Last Post: 31 Dec 2012, 03:05 PM
  3. 1146 Table 'XXXX.zen_configuration' doesn't exist in: [db_cache table]
    By CheapStairParts in forum General Questions
    Replies: 1
    Last Post: 4 Jan 2011, 12:39 AM
  4. table error please help: "table 'sessions' doesn't exist"
    By ebydrc in forum General Questions
    Replies: 3
    Last Post: 6 Apr 2008, 06:13 AM
  5. 1146 Table error zenconfiguration doesn't exist
    By gayelston in forum Installing on a Linux/Unix Server
    Replies: 6
    Last Post: 1 Dec 2007, 10:26 PM

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