Mysql syntax problem
#1

Hello, today i started a new garage system with mysql saving, but when i create a garage with /makegarage command i have this error in mysql log:
Код HTML:
(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 'lock) VALUES (1858.509399, -1883.433715, 13.443518, 235.845504, 1653.058837, 189' at line 1
at this line:

Код:
format(query, sizeof(query), "INSERT INTO `garages` (x, y, z, ex, ey, ez, vw, price, owner, owned, lock) VALUES (%f, %f, %f, %f, %f, %f, %d, %d, 'Statul', 0, 0)",
    GarageInfo[garage][gEnterX],
    GarageInfo[garage][gEnterY],
    GarageInfo[garage][gEnterZ],
    GarageInfo[garage][gExitX],
    GarageInfo[garage][gExitY],
    GarageInfo[garage][gExitZ],
    GarageInfo[garage][gvw],
    GarageInfo[garage][gprice],
    GarageInfo[garage][gowner],
    GarageInfo[garage][gowned],
    GarageInfo[garage][glock]);
I can't find any error in mysql query. Any help?
Reply
#2

The variable query need more space in memory. How much memory currently have?
Reply
#3

lock is a MySQL keyword for locking tables, use it as:
Код:
"INSERT INTO ... , owned, `lock`) VALUES ..."
Reply
#4

Thanks Konstantinos !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)