Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / 1054 Unknown column 'p.products_id' in 'on clause'

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

Locked

Started by tharrison on 18 Jun 2007, 5:17 PM · Views: 3,230

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
18 Jun 2007, 5:17 PM
#1
tharrison avatar

tharrison

New Zenner

Join Date:
Jan 2005
Location:
Austin, TX
Posts:
83
Plugin Contributions:
0

Post #1 by tharrison

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!

18 Jun 2007, 7:30 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

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!]
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!

18 Jun 2007, 8:07 PM
#3
tharrison avatar

tharrison

New Zenner

Join Date:
Jan 2005
Location:
Austin, TX
Posts:
83
Plugin Contributions:
0

Post #3 by tharrison

You are correct!...Many Thanks!

19 Jun 2007, 8:03 PM
#4
tharrison avatar

tharrison

New Zenner

Join Date:
Jan 2005
Location:
Austin, TX
Posts:
83
Plugin Contributions:
0

Post #4 by tharrison

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!

19 Jun 2007, 8:25 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #5 by drbyte

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.

19 Jun 2007, 8:39 PM
#6
tharrison avatar

tharrison

New Zenner

Join Date:
Jan 2005
Location:
Austin, TX
Posts:
83
Plugin Contributions:
0

Post #6 by tharrison

DrByte:

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

19 Jun 2007, 9:00 PM
#7
tharrison avatar

tharrison

New Zenner

Join Date:
Jan 2005
Location:
Austin, TX
Posts:
83
Plugin Contributions:
0

Post #7 by tharrison

Both db have "products_options_row".

19 Jun 2007, 9:28 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #8 by drbyte

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.

19 Jun 2007, 9:30 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #9 by drbyte

tharrison:

Unknown column 'popt.products_options_rows'> tharrison:

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.

19 Jun 2007, 10:33 PM
#10
tharrison avatar

tharrison

New Zenner

Join Date:
Jan 2005
Location:
Austin, TX
Posts:
83
Plugin Contributions:
0

Post #10 by tharrison

DrByte:

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. :clap:

Tip of the day:
Pay attention to the details!