Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


deathgod

Recommended Posts

Posted

Hey everyone,

on my localhost I get the following error:

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

 

select distinct p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from products p left join specials s on p.products_id = s.products_id, products_to_categories p2c, categories c left join featured f on p.products_id = f.products_id where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '2' and p.products_status = '1' and f.status = '1' order by rand() DESC limit 6

but on my web server, it works 100%.

 

My webserver is php4.x and mysql3.x while my localhost is php5.0 and mysql5.x. I guess the reason is because of the differences in php but what can I do to get it working right? This is also important because I'll be moving to a new hosting company soon who run php5. Anyway, can this be fixed by playing with the php.ini file? or do I need to alter te code to get it working?

 

Thanks Nick (the greek:P)

Menou and unome

Posted

Yes, you need to alter database queries for MySQL5 + other code for PHP5 compatibility. Do the updates in the latest update release of osCommerce and search contribution/forums for "PHP5"

 

 

Sonia

Archived

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

×
×
  • Create New...