Using symfony 4.4, i create a form to update data table in mysql 5.7. all other data table is working fine, but having an error in one table.
I tried to insert a new data but having an error like this.
An exception occurred while executing 'INSERT INTO dtb_repair (order_no, product_id, product_code, resize, original_size, option, description, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' with params ["9", "4", "329", 0.5, "0.5", 3, "eee", "repair"]:
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 'option, description, discriminator_type) VALUES (9, 4, '329', '0.5', '0.5', 3, '' at line 1
To make sure it's not a form issue, i tried to put it manually in mysql command line, but still have the same error. So i guess my command is wrong, but i really have no idea which part i have to fix.
Field | Type | Null | Key | Default | Extra |
+--------------------+------------------+------+-----+---------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| order_no | int(11) | NO | | NULL | |
| product_id | int(11) | NO | | NULL | |
| product_code | varchar(50) | YES | | NULL | |
| resize | decimal(10,1) | NO | | NULL | |
| original_size | decimal(10,1) | NO | | NULL | |
| option | int(11) | NO | | NULL | |
| description | varchar(255) | NO | | NULL | |
| discriminator_type | varchar(255) | NO | | NULL |
this is the data table that i created.
INSERT INTO dtb_repair (order_no, product_id, product_code, resize, original_size, option, description, discriminator_type) VALUES (9, 4, '324', '0.5', '0.5', 1, 'test', 'repair');
the command seems ok for me, but i have no idea where i got an error.