I have a table that will insert questions for a multiple choice type test examination with a column name "Order". And I want to Insert data into this table. but it seems I have a syntax error.
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 'choice A, 'A'), (808,Sample choice B, 'B')' at line 3"
and I think it is pertaining to the word "Order", so i tried escaping it by placing Backticks and still getting the error. I've read other solutions to this problem and some of them suggested to change the name of the column instead. Unfortunately, I can't do that to this table. the name of the column is fixed so I need help how can I escape the column name "Order"? or if there are other error to my code?
Edited Code with quote:
$db->query("INSERT INTO dt_choices (qid, choice, `order`)
VALUES
(".$this_qid.",".$result[0]['test_choiceA'].", 'A'),
(".$this_qid.",".$result[0]['test_choiceB'].", 'B')
");