Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error message php 4 to php 5


rusty1001

Recommended Posts

Hi

 

I am getting this error for php4 to php 5 upgrade, anyone know the syntax changes, I think it is left join error, ??

 

Effecting three files, orders, customer and newsletter,

 

tx

R

 

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 (osc_orders o, osc_orders_status s) left join osc_orders_total ot on (o.orders_id = ot.orders_id) where o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total' order by o.orders_id DESC limit -20, 20

 

 

   $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from (" . TABLE_ORDERS . " o, " . TABLE_ORDERS_STATUS . " s) left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC";

Rusty

-------------------------------------------

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...