How to insert a row into the order table?

0 like 0 dislike
7 views
Good day!
Doing a simple store with the framework 4, the task of putting the order into the order table. Can't embed, it gives an error

An exception occurred while executing 'INSERT INTO order (sum) VALUES (?)' with params ["0.00"]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'order (sum) VALUES ('0.00')' at line 1


here is the table structure

CREATE TABLE `order` ( id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, sum decimal(20, 2) UNSIGNED DEFAULT 0.00, PRIMARY KEY (id) ) ENGINE = INNODB CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
by | 7 views

1 Answer

0 like 0 dislike
Reserved words must be enclosed in quotation marks

/** * @ORM\\Table(name="`order`") */ class Order {}
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked May 21, 2019 by polyanin
0 like 0 dislike
2 answers
0 like 0 dislike
5 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
33,868 users