PDA

View Full Version : Oscommerce SQL problem, look here


CaseSenTeV
12-20-05, 10:36 PM
When I go to certain categories such as Newsletter Manager, and Customers, I get this message:

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

What should I do?

stevel
12-21-05, 10:32 AM
Grumble. There HAD been a "Read Me" sticky thread on this subject, but it got unstuck. The fix for this is one of the edits in the osCommerce update. See http://www.oscommerce.com/ext/update-20051113.html#_Toc119693704 for the specific edit.

LadyShelly
2-4-06, 12:13 PM
*Bump*

The newer osCommerce files (specifically split_page_results.php ) listed in the linked post, no longer have the "Line 67 $this->sql_query .= " in them. :eek:

All I had to do was just replace the line 38 -> max($offset, 0) and re-upload. It fixed a MySQL error message for Manufactures and Newsletters :cool:

Thanks Steve!