Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MySQL Errors In Admin Section Under ORDERS


bitznbytes

Recommended Posts

Posted

Hi, my hosting provider had made changes to their MySQL servers and I'm trying like crazy to make fixes to my oscommerce setup as a result. The most recent problem is in my admin section under ORDERS. If you have 0 listed in any of the Delivered, pending, processing, or preparing PALPAL orders it will give you the following error 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 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 = '1' and ot.class = 'ot_total' order by o.orders_id DESC limit -20, 20

 

Can anyone shed any light on this and suggest any easy solution? I'm stumped and my hosting provider won't help....

 

Thanks in advance,

Bitz

Posted

Look in the orders.php file and find the line that generates that query - then paste it on here in full

Posted

The patches link in my sig block has the patch for this (I believe)

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted
Look in the orders.php file and find the line that generates that query - then paste it on here in full

Can't seem to find it in my admin/orders.php file....any other suggestions?

Posted
Look in the orders.php file and find the line that generates that query - then paste it on here in full

 

Hi, would this be it?

 

$orders_status_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$languages_id . "'");

while ($orders_status = tep_db_fetch_array($orders_status_query)) {

$orders_statuses[] = array('id' => $orders_status['orders_status_id'],

'text' => $orders_status['orders_status_name']);

$orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];

}

 

$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...