Yovav Posted October 5, 2005 Share Posted October 5, 2005 Dear all. I get this error on Admin -> Newsletter Manager: Newsletter Manager Newsletters Size Module Sent Status Action 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 newsletters_id, title, length(content) as content_length, module, date_added, date_sent, status, locked from newsletters order by date_added desc limit -20, 20 [TEP STOP] How can I fix it ? Thank you for reading Best Regards - Yovav Gad Link to comment Share on other sites More sharing options...
Yovav Posted October 6, 2005 Author Share Posted October 6, 2005 ? :blink: Thank you for reading Best Regards - Yovav Gad Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2005 Share Posted October 6, 2005 http://www.oscommerce.com/community/bugs,1605/search,sql Link to comment Share on other sites More sharing options...
Yovav Posted October 6, 2005 Author Share Posted October 6, 2005 Thanks! - the bottom post worked for me: 29 Sep 2005 19:21:49 hpdl (AT) oscommerce (DOT) com 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; Thank you for reading Best Regards - Yovav Gad Link to comment Share on other sites More sharing options...
Guest Posted October 11, 2005 Share Posted October 11, 2005 Thank you!!!! This is the very same problem I was having. The fix worked wonderfully. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.