D-BlooD Posted October 11, 2005 Posted October 11, 2005 Hi all Does anyone know how to solve this problem? 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 '-0, MAX_DISPLAY_LATEST_NEWS_PAGE' at line 1 select news_id, headline, content, date_added from latest_news news where status = '1' and language = '4' order by date_added DESC limit -0, MAX_DISPLAY_LATEST_NEWS_PAGE Im using MySQL 4.1.14 on the server i get that error on and on my test server at home i run MySQL 4.1.11 and that problem dosnt exist there. -- D-BlooD
firfin Posted October 11, 2005 Posted October 11, 2005 Im using MySQL 4.1.14 on the server i get that error on and on my test server at home i run MySQL 4.1.11 and that problem dosnt exist there. -- D-BlooD A bug was fixed in mysql which causes a small problem for osC . It is easily fixed, you need to edit 2 files. see http://www.oscommerce.com/community/bugs,1605 at the bottom of the page is the official solution. Can't think of a signature tight now. But just you wait till I read the next Discworld!
D-BlooD Posted October 11, 2005 Author Posted October 11, 2005 Thanks for your reply :) I tryed the solution from that bug fix but im still getting the same errors.. I guess this bug fix solved some problem that i wasnt aware of or have seen myself so i guess its not totaly wasted :) Thanks for the report, here is the official fix: Line 67 in catalog/includes/classes/split_page_results.php must be changed from: $this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page; to: $this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page; Line 38 in catalog/admin/includes/classes/split_page_results.php must be changed from: $sql_query .= " limit " . $offset . ", " . $max_rows_per_page; to: $sql_query .= " limit " . max($offset, 0) . ", " . $max_rows_per_page; If anyone else have any other suggestions please reply :) I know there are other news solutions out there, but I am only looking for a easy one. :) -- D-BlooD
Guest Posted October 11, 2005 Posted October 11, 2005 what the value you've set for the MAX_DISPLAY_LATEST_NEWS_PAGE definition? Make sure its not 0
D-BlooD Posted October 12, 2005 Author Posted October 12, 2005 Ok this is the 2nd time MySQL Administrator has caused me extra time ;) Reinstalled the tables for the latest_new through the shell instead of using MySQL Administrator and everything solved itself ;) Cant realy relay on that software ;) Thanks for all the reply's :) -- D-BlooD
Recommended Posts
Archived
This topic is now archived and is closed to further replies.