Guest Posted November 5, 2005 Posted November 5, 2005 I'am getting this error in the Newsletter Manager in Admin any suggestions? 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]
gtwcmt Posted November 16, 2005 Posted November 16, 2005 http://www.oscommerce.com/forums/index.php?sho...26entry697026 Answer is in post two... "This is a problem with MySQL 4.1 and osCommerce. In admin/includes/classes/split_page_results.php, around line 37 you'll see these two lines of code: $offset = ($max_rows_per_page * ($current_page_number - 1)); $sql_query .= " limit " . $offset . ", " . $max_rows_per_page; Sandwich these lines of code between the two lines above: if ($offset < 0) { $offset = 0 ; } That should resolve the problem. Vger" <<<< ANSWER/FIX FROM
Recommended Posts
Archived
This topic is now archived and is closed to further replies.