MySQL.Async.fetchAll('INSERT INTO position (id, x, y, z) VALUES (@id, @x, @y, @z)',
{['@id'] = identifier, ['@x'] = coords.x, ['@y'] = coords.z, ['@z'] = coords.z})
Hi. I'm learning to programm and I've written the simple command above for my FiveM server, but for some reason it returns the code below, when it should be all right. I've checked and everything is ok with the id and the coords, so the problem must be, as indicated, the syntax.
[MySQL] [testeServerClient] An error happens on MySQL for query "INSERT INTO position (id, x, y, z) VALUES (@id, 0, 0, 0)": ER_PARSE_ERROR: 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 'position (id, x, y, z) VALUES (@id, 0, 0, 0)' at line 1
Does anyone know how to fix it? My MariaDB version is 10.4.11-MariaDB . Thanks!