Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Bug in SQL syntax or bug in MySQL ?


Recommended Posts

After moving OsCommerce to a new server I get this error in the admin section when I click on Products Purchased:


Best Products Purchased


1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1


select p.products_id, p.products_ordered, pd.products_name from products p, products_description pd where pd.products_id = p.products_id and pd.language_id = '1' and p.products_ordered > 0 group by pd.products_id order by p.products_ordered DESC, pd.products_name limit -20, 20





This was working properly on the old server.

New MySQL version : 4.1.11-standard

Old MySQL version : 4.0.18


It looks to me that an offset of -20 is not correct, but not catched by the old server.

If this logic is right, it is a bug in OsCommerce.

Any ideas ?

Link to comment
Share on other sites


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

  • Create New...