Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Clicking on category shows error...


majestique

Recommended Posts

Posted

Here's what I see when I created any arbitrary category and click on the category link:

 

 

  
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 = '26'

[TEP STOP]

 

 

Does anyone know what's wrong? Thanks!

Posted

it has to do with mysql version you're using. Have a look on the osc downloads page, get the latest version and either upgrade or do manual mods to the pages with the documented sql queries.

Posted

thanks for your reply Mark! but my osc is quite modified.. now i gotta probably look for categories.php and figure out what's the problem?

 

i have multiple sites on one host, and have the same shopping cart.. the categories work fine on one site.. but not on the other.. so it can't be the mysql version or the query? the scripts are exactly identical... hmm what else could it be?

Posted

Might try the brackets cure B)

Change

  
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 = '26'

 

to

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 = '26'

 

Seagoofy

Archived

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

×
×
  • Create New...