A
A
amdma2022-01-06 20:13:27
MySQL
amdma, 2022-01-06 20:13:27

What's wrong with insert?

What's wrong here:
INSERT INTO games SET moves = 0, winner = "net", creator = ?, 1 = "-", 2 = "-", 3 = "-", 4 = "-", 5 = " -", 6 = "-", 7 = "-", 8 = "-", 9 = "-"

Error:
code: 'ER_PARSE_ERROR',
errno: 1064,
sqlState: '42000',
sqlMessage: `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 '1 = "-", 2 = "-", 3 = "-", 4 = "-", 5 = "-", 6 = "-", 7 = "-", 8 = "-", 9 = "-"' at line 1`,
sql: 'INSERT INTO games SET moves = 0, winner = "net",

61d724b180da6612216604.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2022-01-06
@amdma

Add quotes:

INSERT INTO games SET moves = 0, winner = "net", creator = ?, `1` = "-", `2` = "-", `3` = "-", `4` = "-", `5` = "-", `6` = "-", `7` = "-", `8` = "-", `9` = "-"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question