AntonioGPS Posted June 27, 2006 Posted June 27, 2006 Everytime I try to access to the Offer section of oscommerce, I get this 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 p.products_id, pd.products_name, p.products_price, s.specials_id, s.specials_new_products_price, s.specials_date_added, s.specials_last_modified, s.expires_date, s.date_status_change, s.status from products p, specials s, products_description pd where p.products_id = pd.products_id and pd.language_id = '3' and p.products_id = s.products_id order by pd.products_name limit -20, 20 It happens also when I try to get access to a part of the MySQL database that seems to be empty.. The offer section is empty because I cannot get acces into it. This is not an server-based error, since other oscommerce stores in the same server are working nicely.. Any clues ?
maggiemk Posted June 27, 2006 Posted June 27, 2006 Hello, This is a good solution, try! Find: http://www.oscommerce.com/community/bugs, 1065 Fix the problems when you removed all the manufactures, reviews, specials from store by admin panel. 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; Good Luck, Maggie
AntonioGPS Posted June 30, 2006 Author Posted June 30, 2006 You are absolutley right !!. It works great now.. I thank you for everything.. Hello, This is a good solution, try! Find: http://www.oscommerce.com/community/bugs, 1065 Fix the problems when you removed all the manufactures, reviews, specials from store by admin panel. 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; Good Luck, Maggie
Recommended Posts
Archived
This topic is now archived and is closed to further replies.