Reputation: 4349
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 '(country,ping,order) VALUES (China,1,1)' at line 1
this is my code
INSERT INTO
(country, ping, order)
VALUES
('China', '1', '1');
Upvotes: 0
Views: 6019
Reputation: 825
You're missing the Table Name. Try:
INSERT INTO MYTABLENAME (country,ping,order) VALUES ('China','1','1');
Upvotes: 2
Reputation: 8118
you are missing table name. also make sure that those quotes are necessary
Upvotes: 0
Reputation: 65587
Your insert statement is missing the table name:
INSERT INTO tbl_name (col_name,...) VALUES (expr,...)
Upvotes: 2
Reputation: 3644
are ping and order text fields or numeric? if numeric remove the ticks from the 1's
INSERT INTO Tablename (country,ping,order) VALUES ('China',1,1)
could also be reserved word try:
INSERT INTO Tablename (country,`ping`,`order`) VALUES ('China',1,1)
Upvotes: 2