I have a mysql (MariaDB) table with a plenty of lines. I deleted by mistate a row. And I would like to recover it from a backup.
This is the row I found in the sql backup file:
| 186 | {"price":8990,"quantity":1,"shipping":0,"electronicShipping":false,"description":"xxxx \"yyy uuu iii\" + xyz xyz","cname":"Name LastName","fname":"Name","email":"asdfdsa@afsfa.com","phone":"76543765","address":"sadfas123/avc","city":"XXX","state":"vvvv","zip":"654326","newsletter":true,"product":{"sku":"pakiet","name":"YUIa \"sdfghjk\" + xyz sfas","description":"YYYY \"xxxx yyyy zzzz\" + xyz xyz xyz + 3 xyz yyyy xxxx","originalPrice":149.6,"price":89.9,"vat":5,"shipping":0,"electronicShipping":false,"discount":59.7,"category":["drukowane","ebooki"],"image":"/images/xxx.jpg","shopImage":"/images/tyyyy.jpg","template":"d-idsgiosdjgiodjsgs","links":[{"file":"xyz.mobi","name":"File Name"},{"file":"zxvfsdfs.epub","name":"File name"},{"file":"sdfasfdw.pdf","name":"File name"},{"file":"asdgdsagds.pdf","name":"File name"}],"mailerLiteGroupID":[11111,22222],"sendgridListIds":["456789-54321-6543-654","76543-654327-6543"],"mailerLiteBuyersGroupID":[1234,12345]},"privacy":true,"terms":true,"comment":"","template":"d-234567890","vat":false,"vatCompany":"","vatNip":"","vatAddress":"","vatCity":"","vatState":"","vatZip":"","status":1,"extra":null,"selectAll":true,"statement":"34-3242-2345"} | 1 | 2021-12-24 15:21:52 | 2021-12-24 15:22:12 | 1560281088 | NULL | NULL |
I am trying to add it this way:
INSERT INTO Orders (id, body, state, createdAt, updatedAt, orderNumber, send, invoice)
-> VALUES (186, {"price":8990,"quantity":1,"shipping":0,"electronicShipping":false,"description":"xxxx \"yyy uuu iii\" + xyz xyz","cname":"Name LastName","fname":"Name","email":"asdfdsa@afsfa.com","phone":"76543765","address":"sadfas123/avc","city":"XXX","state":"vvvv","zip":"654326","newsletter":true,"product":{"sku":"pakiet","name":"YUIa \"sdfghjk\" + xyz sfas","description":"YYYY \"xxxx yyyy zzzz\" + xyz xyz xyz + 3 xyz yyyy xxxx","originalPrice":149.6,"price":89.9,"vat":5,"shipping":0,"electronicShipping":false,"discount":59.7,"category":["drukowane","ebooki"],"image":"/images/xxx.jpg","shopImage":"/images/tyyyy.jpg","template":"d-idsgiosdjgiodjsgs","links":[{"file":"xyz.mobi","name":"File Name"},{"file":"zxvfsdfs.epub","name":"File name"},{"file":"sdfasfdw.pdf","name":"File name"},{"file":"asdgdsagds.pdf","name":"File name"}],"mailerLiteGroupID":[11111,22222],"sendgridListIds":["456789-54321-6543-654","76543-654327-6543"],"mailerLiteBuyersGroupID":[1234,12345]},"privacy":true,"terms":true,"comment":"","template":"d-234567890","vat":false,"vatCompany":"","vatNip":"","vatAddress":"","vatCity":"","vatState":"","vatZip":"","status":1,"extra":null,"selectAll":true,"statement":"34-3242-2345"}, 1, 2021-12-24 15:21:52, 2021-12-24 15:22:12, 2634022912, NULL, NULL);
But it's giving me:
ERROR 1064 (42000): 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 '"price":8990,"quantity":1,"shipping":0,"electronicShipping":false,"description":' at line 2
Can anybody help me to add this line to the Orders
table?