0

We are getting the below error while fetching the orders on opencart.

error:

{"status":200,"data":"\"Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDBserver version for the right syntax to use near 'order ORDER BY order_id DESC' at line 1<br \\\/>Error No: 1064<br \\\/>SELECT * FROM order ORDER BY order_id DESC\""}

please help

I am using opencart 3.0.3.8

I am new to opencart, still learning it so I didn't find a solution for the same. I need help here.

2 Answers2

0

Your SQL contains the word "order" for the order table. However, order is a keyword. You need to put it in backticks - ie `order`

Jay Gilford
  • 15,141
  • 5
  • 37
  • 56
0

It's conflicting with the predefined word ORDER BY So you need to change it to be order

Momen Shaker
  • 141
  • 1
  • 9