thunderbats Posted January 15, 2005 Posted January 15, 2005 For about 5 admin pages I'm getting the following error 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 c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price) as ordersum from customers c, orders_products op, orders o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC limit -20, 20 It does not, however, list the file name so I'm unsure of where I need to look to find the SQL Syntax error. Any help appreciated. Thanks :)
OceanRanch Posted January 15, 2005 Posted January 15, 2005 There appears to be a bug report on this. It might apply in this situation. A solution is 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 Bug report: http://www.oscommerce.com/community/bugs,1605 HTH Tom
Recommended Posts
Archived
This topic is now archived and is closed to further replies.