Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    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. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    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.

 

 

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