Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

MySQL 4.1.7 problem


Recommended Posts

I have 5 working and VERY busy shops. My server host has upgraded to MySQL 4.1.7 and now I get the following error (or variation)


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, pd.products_name, pd.products_viewed, l.name from products p, products_description pd, languages l where p.products_id = pd.products_id and l.languages_id = pd.language_id order by pd.products_viewed DESC limit -20, 20


This appears in the Admin panel under Manufacturers, Reports, Reviews etc.


Anyone tell me where I can make the correction. My host does not want to downgrade the MySQL as they causes other problems on the server.


Any urgent help woudl be appreciated





Link to comment
Share on other sites


A quick summary of the patch code.....


edit /includes/classes/split_page_results.php


$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;

(line about 66)

insert before it

if($offset <0 ) $offset = 0;


the same in admin//includes/classes/split_page_results.php

do the same, but this time it's line about 38




Link to comment
Share on other sites


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

  • Create New...