Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Another 1054 Error question


bnguru

Recommended Posts

Posted

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

Posted
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.

Posted
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...