Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1064 Error MySQL


christianmusicman

Recommended Posts

Posted
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 'limit 0, 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 = '2' and ot.class = 'ot_total' order by limit 0, 20

 

This is the Error that I get when I go into the Orders in the Admin section. I've seen MANY posts on this and have even tried the whole "fix" for the bug.

 

if ($offset < 0)

{

$offset = 0 ;

}

 

Any ideas at all why it would still be giving me this stupid error even after I applied the "fix"

"Yesssss!"

-Napoleon Dynamite

Posted
You're missing a field name after "order by".  This would probably come from a field in the database.  Look at where the query is constructed in your PHP and see what it is supposed to be.

 

Right, so I'm quite new at this... Where would I need to look? In the PHP file (if so, which file) or the MySQL Admin? Thanks for your help.

"Yesssss!"

-Napoleon Dynamite

Posted

you need to look in the contribution readme/docs file and find the lines or sql file you need to add to your database via phpmyadmin

  • 2 weeks later...
Posted
you need to look in the contribution readme/docs file and find the lines or sql file you need to add to your database via phpmyadmin

 

Alright, I looked in the readme.txt file that was sent with the contrib. I added the new "updated" status in the orders_status table in the phpMyAdmin and set it to 4. I'm still getting that error when i try to view the orders. Any ideas on what I'm doing wrong? Thanks for your help.

"Yesssss!"

-Napoleon Dynamite

Archived

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

×
×
  • Create New...