Sanguinarius Posted May 15, 2007 Share Posted May 15, 2007 Hi, Zthe server my domain is on went bad and they changed over to a new one and restored everything from a backup. Now, when I went to delete a (test) order, I get: 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 o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '1' and s.orders_status_id = '20' and ot.class = 'ot_total' order by o.orders_id DESC limit -20, 20 [TEP STOP] I have no idea what this means or why I'm suddenly getting it. My store WAS operating before this. (*wonders what other surprises lay in store for her*) Somebody please help me? I'm using osc2 ms2. --Sanguinarius If you're reading this, I'm probably pulling my hair out. ;> *waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.) Link to comment Share on other sites More sharing options...
mtechama Posted May 15, 2007 Share Posted May 15, 2007 Hi, Zthe server my domain is on went bad and they changed over to a new one and restored everything from a backup. Now, when I went to delete a (test) order, I get:I have no idea what this means or why I'm suddenly getting it. My store WAS operating before this. (*wonders what other surprises lay in store for her*) Somebody please help me? I'm using osc2 ms2. Sounds like you have an SQL issue. Wade Morris Amarillo, Texas Before you do any changes on your site you need to do BACKUP! BACKUP! Link to comment Share on other sites More sharing options...
Sanguinarius Posted May 15, 2007 Author Share Posted May 15, 2007 ok. How do I fix it? --Sanguinarius If you're reading this, I'm probably pulling my hair out. ;> *waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.) Link to comment Share on other sites More sharing options...
mtechama Posted May 15, 2007 Share Posted May 15, 2007 did everything work great before the server went bad? Wade Morris Amarillo, Texas Before you do any changes on your site you need to do BACKUP! BACKUP! Link to comment Share on other sites More sharing options...
sugiartha Posted May 15, 2007 Share Posted May 15, 2007 Open your file admin/includes/classes/split_page_results.php and find this code: $sql_query .= " limit " . $offset . ", " . $max_rows_per_page; right before that code, insert : if($offset < 0) $offset = 0; Sugiartha ------------------------------------------ concept of life: enjoy aja! Link to comment Share on other sites More sharing options...
satish Posted May 15, 2007 Share Posted May 15, 2007 This will happen with Mysql 5 so apply all the patches released on oscommerce. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does. Link to comment Share on other sites More sharing options...
Sanguinarius Posted May 15, 2007 Author Share Posted May 15, 2007 I opened that file and searched for $sql_query .= " limit " . $offset . ", " . $max_rows_per_page; and it was not found. What do I do now? **edit** However, I DID find the code: $this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page; ----- Where do I find the patches? --Sanguinarius If you're reading this, I'm probably pulling my hair out. ;> *waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.) Link to comment Share on other sites More sharing options...
Sanguinarius Posted May 15, 2007 Author Share Posted May 15, 2007 Oops, I wasn't looking in the right file..teach me to do this with people over, distracting me! FOund the code, added the line of code and it's working now. Thanks muchly! ----- Where do I find the patches? Do I still need them? --Sanguinarius If you're reading this, I'm probably pulling my hair out. ;> *waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.) Link to comment Share on other sites More sharing options...
satish Posted May 17, 2007 Share Posted May 17, 2007 http://www.oscommerce.com/forums/index.php?showtopic=180289 Is always recommended to add those patches. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does. Link to comment Share on other sites More sharing options...
user99999999 Posted May 18, 2007 Share Posted May 18, 2007 sorry error Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.