Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2005
    Location
    Austin, TX
    Posts
    93
    Plugin Contributions
    0

    red flag 1054 Unknown column 'p.products_id' in 'on clause'

    Our ISP upgraded their MySQL server over the weekend and now I get this error anytime we try to view a product page or sub-category page:

    1054 Unknown column 'p.products_id' in 'on clause'

    Our ISP is telling us our script code is looking for a table called "p" and there is no such table in the database. Duh!. However, the "p.products_id" call is all through out the code in some 600+ files.

    Please Help!

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: 1054 Unknown column 'p.products_id' in 'on clause'

    See if this post in the Wiki helps you out ...

    http://www.zen-cart.com/wiki/index.p...27on_clause.27
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jan 2005
    Location
    Austin, TX
    Posts
    93
    Plugin Contributions
    0

    Default Re: 1054 Unknown column 'p.products_id' in 'on clause'

    You are correct!...Many Thanks!

  4. #4
    Join Date
    Jan 2005
    Location
    Austin, TX
    Posts
    93
    Plugin Contributions
    0

    Have a Drink Re: 1054 Unknown column 'p.products_id' in 'on clause'

    Same error, new column: After importing attributes and options tables:
    --------------------------------------------------------------------------------------------
    1054 Unknown column 'popt.products_options_rows' in 'field list'
    in:
    [select distinct popt.products_options_id, popt.products_options_name, popt.products_options_sort_order, popt.products_options_type, popt.products_options_length, popt.products_options_comment, popt.products_options_size, popt.products_options_images_per_row, popt.products_options_images_style, popt.products_options_rows from products_options popt, products_attributes patrib where patrib.products_id='250' and patrib.options_id = popt.products_options_id and popt.language_id = '1' order by LPAD(popt.products_options_sort_order,11,"0")]
    --------------------------------------------------------------------------------------------

    My Process:

    1. New Install Zencart v1.3.7
    2. Import customers, customers_info db, test.
    3. Import orders, orders_products, orders_status, order_status_history and
    order_total db, test.
    4. Import products and products_description db, test.
    5. Import any products attributes or options tables, get error msg.
    6. Empty all product attribute or option tables, no error msg.

    I've compared all table from the old MySQL 4 db with the newly install db on MySQL 5 and they are identical.

    I'm stumped! Time for a drink!

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1054 Unknown column 'p.products_id' in 'on clause'

    What version was your Zen Cart site using before the upgrade ?

    Unknown column 'popt.products_options_rows'
    Does the 'products_options_rows' field exist in the products_options table ?
    .

    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.

  6. #6
    Join Date
    Jan 2005
    Location
    Austin, TX
    Posts
    93
    Plugin Contributions
    0

    Default Re: 1054 Unknown column 'p.products_id' in 'on clause'

    Quote Originally Posted by DrByte View Post
    What version was your Zen Cart site using before the upgrade ?


    Does the 'products_options_rows' field exist in the products_options table ?
    Version 1.2.5

  7. #7
    Join Date
    Jan 2005
    Location
    Austin, TX
    Posts
    93
    Plugin Contributions
    0

    Default Re: 1054 Unknown column 'p.products_id' in 'on clause'

    Both db have "products_options_row".

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1054 Unknown column 'p.products_id' in 'on clause'

    What exact procedure did you follow for upgrading your Zen Cart files/database from v1.2.5 to v1.3.7 ?
    .

    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.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1054 Unknown column 'p.products_id' in 'on clause'

    Quote Originally Posted by tharrison
    Unknown column 'popt.products_options_rows'
    Quote Originally Posted by tharrison View Post
    Both db have "products_options_row".
    If both databases have the field, but the database engine is telling you it cannot find the field ... then you must have it pointed to the wrong database.

    Are your database settings in your configure.php pointed to the right database, server, username, password? Do they have the correct db table-prefix set?
    .

    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.

  10. #10
    Join Date
    Jan 2005
    Location
    Austin, TX
    Posts
    93
    Plugin Contributions
    0

    Default Re: 1054 Unknown column 'p.products_id' in 'on clause'

    Quote Originally Posted by DrByte View Post
    If both databases have the field, but the database engine is telling you it cannot find the field ... then you must have it pointed to the wrong database.

    Are your database settings in your configure.php pointed to the right database, server, username, password? Do they have the correct db table-prefix set?
    The problem was the field name: 'products_option_rows' The ending "s" in the field name was not on either table. I changed both. Imported each attribute and options tables one at a time and it is now working just fine. All attributes and options are functional and no more error.

    Tip of the day:
    Pay attention to the details!

 

 

Similar Threads

  1. 1054 Unknown column 'p.products_id' in 'on clause'
    By cathytsui in forum General Questions
    Replies: 0
    Last Post: 23 Jul 2009, 02:07 PM
  2. 1054 Unknown column 'p.products_id' in 'on clause'
    By jeffnord in forum Setting Up Categories, Products, Attributes
    Replies: 30
    Last Post: 30 Apr 2009, 05:22 PM
  3. 1054 Unknown column 'p.products_id' in 'on clause'
    By phylrust in forum General Questions
    Replies: 3
    Last Post: 5 Jan 2009, 08:36 PM
  4. 1054 Unknown column 'p.products_id' in 'on clause'
    By pepsishot in forum General Questions
    Replies: 14
    Last Post: 27 Aug 2007, 03:52 PM
  5. 1054 Unknown column 'p.products_id' in 'on clause'
    By JayCali in forum Installing on a Linux/Unix Server
    Replies: 15
    Last Post: 29 Apr 2007, 07:44 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR