Answer the question
In order to leave comments, you need to log in
How to insert rows into order table?
Good afternoon!
I'm making a simple store on symfony 4, the task is to put an order in the order table. Can't insert, throws 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
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;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question