mysql doesn't insert
#1

hello

im trying to make a backup of my ini files on mysql
but i get an error with sending it to the database
Код:
CMySQLHandler::Query(INSERT INTO `playerinfo` (`user`, `password`, `money`, `adminlevel`) VALUES ('keessie', 'mypass', '0', '0',)) - An error has occured. (Error ID: 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 ')' at line 1);
it's reading from the ini file for the mypass password so that is working but when i look inside my database there is nothing

its my first try with mysql :P
can someone help me?

EDIT: the update line what comes up when a player already exist on the database works fine
Код:
format(query, sizeof(query), "UPDATE `playerinfo` SET `password` = '%d',`money` = '%d', `adminlevel` = '%d'  WHERE `user` = '%s'",dini_Get(archive, "Password"), dini_Int(archive, "money"), dini_Int(archive, "Adminlevel"), Pname);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)