Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

customers and orders are driving me nuts


Simplyeasier

Recommended Posts

I have created a new site on a new hosts server - copied from my exisiting host.

 

I set up the database from scratch and added the tables from the old host

 

Everything works EXCEPT

 

Orders and Customers when viewed from the admin panel

 

On the new server I get this for orders when looking thro admin

 

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 '-6, 6' 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 ot.class = 'ot_total' order by o.orders_id DESC limit -6, 6

 

and this when looking at customers from admin

 

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 '-6, 6' at line 1

 

select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from customers c left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id order by c.customers_lastname, c.customers_firstname limit -6, 6

 

Everything else in the store is OK

 

I have looked at this for the best part of 8 hrs :D I need fresh ideas - can anyone help ?

 

Charles

A kite flies highest AGAINST the wind !

 

"Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, a lover in one hand, martini in the other, body thoroughly used up, totally worn out and screaming ~ WOO HOO!! What a ride!"

Link to comment
Share on other sites

Newer versions of mysql do not allow for "negative" limits in the sql statement.

 

This bug report will show you what changes you need to make in split_results.php.

 

http://www.oscommerce.com/community/bugs,1605

 

HTH

Tom

 

Tom

 

When you are next in Bury st Edmunds - drop by theres a lot of cold beers in the fridge for you

 

thanks friend - worked a charm

 

Only thing is why isn't that in tips and tricks - ?

 

Charles

A kite flies highest AGAINST the wind !

 

"Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, a lover in one hand, martini in the other, body thoroughly used up, totally worn out and screaming ~ WOO HOO!! What a ride!"

Link to comment
Share on other sites

I agree, this error is gonna pop_up many times from now on. The PHP5 $this=null and the newer versions of mysql will cause two immediate headaches for newbees.

 

I will look forward to tipping one with you Charles next time I'm across the "pond".

 

Cheers.

Tom

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...