Hi, I have a table named "order", when I user db_select or db_query to fetch data from this table, there will be errors.
PDOException: SQLSTATE[42000]: Syntax error or access violation: 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 'order' at line 1: SELECT * FROM order; Array ( )
Something like that.
I know order is keyword of SQL. so we can't use "order" as our table name?
Thank you.
Comments
Comment #1
David_Rothstein commentedAs far as I understand, reserved keywords shouldn't be used in Drupal (even if some databases will allow them with proper escaping) - see http://drupal.org/node/2497.