Question : Zen cart error - 1054 Unknown column 'p.products_id' in 'on clause'

Recently the web hosting comapny upgraded the php and my SQL. Now my site is getting the error message 1054 Unknown column 'p.products_id' in 'on clause'

How to fix the error?

Answer : Zen cart error - 1054 Unknown column 'p.products_id' in 'on clause'

You need to with needing parenthesis around part of a left join statement

Something like

from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join

should now be written

from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join

Upgrading Zen-Cart should fix it

----- http://www.zen-cart.com/wiki/index.php/Errors#1054_Unknown_column_..._in_.27on_clause.27
1054 Unknown column ... in 'on clause'  
This probably means you have MySQL 5 installed on your server, and Zen Cart" 1.2.6d does not fully support MySQL 5.
See this bug report for more info regarding issues with MySQL 5 in Zen Cart" 1.2.6d.
This issue has largely been fixed in the version 1.3.x series, and will be improved with each release.
If you have to stick with 1.2.6, the best solution seems to be downgrading to MySQL 4.  
------

Here is a thread on the zen-cart forum with a fix, if upgrading isn't an acceptable solution http://www.zen-cart.com/forum/showthread.php?t=37460
Random Solutions  
 
programming4us programming4us