Ok I have a very simple mysql database but when i try to run this query via mysql-admin i get weird errors
INSERT INTO customreports (study, type, mode, select, description) VALUES ('1', '2', '3', '4', '5');
Error:
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 'select, description) VALUES ('1', '2', '3', '4', '5')' at line 1
You're having problems because you're using SQL reserved words as column names and not escaping them. Try like this:
INSERT INTO `customreports`
(`study`, `type`, `mode`, `select`, `description`)
VALUES
('1', '2', '3', '4', '5');
Yeah, I would rewrite as:
INSERT INTO [customreports] ([study], [type], [mode], [select], [description]) VALUES ('1', '2', '3', '4', '5');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With