netmaker Posted March 8, 2005 Share Posted March 8, 2005 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 Thanks Paul Link to comment Share on other sites More sharing options...
OceanRanch Posted March 8, 2005 Share Posted March 8, 2005 http://www.oscommerce.com/community/bugs,1605 A quick summary of the patch code..... edit /includes/classes/split_page_results.php find $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 HTH Tom Link to comment Share on other sites More sharing options...
netmaker Posted March 8, 2005 Author Share Posted March 8, 2005 Tom You are a star and a lifesaver Thanks, this worked a treat Regards Paul Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.