bnguru Posted April 25, 2009 Posted April 25, 2009 I am getting this error when I try to look at products generically by category: 1054 - Unknown column 'p.products_id' in 'on clause' select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '34' [TEP STOP] Any thoughts? Also - under the manufacturers box I only get the original sample data (which I thought I deleted), Yet when I look under categories, although I get the error above, the proper manufacturers list drops down. Why two different sources? Steve in Ellenton, FL
Guest Posted April 25, 2009 Posted April 25, 2009 Another 1054 Error question Did you bother doing a search on google? Search Also - under the manufacturers box I only get the original sample data Clear yuour cache or turn it off in admin section.
MrPhil Posted April 26, 2009 Posted April 26, 2009 1054 - Unknown column 'p.products_id' in 'on clause' select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '34' Assuming your system is running MySQL 5, this has been discussed many times before. Basically, you need to find the PHP code that outputs this SQL statement, and add parentheses around comma-separated lists of tables between FROM and JOIN: select count(p.products_id) as total from ((products_description pd, products p) left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c) left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '34' Unfortunately, there are many other places in osC that need this kind of update for MySQL 5.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.