16.07.2012, 07:48
I'm new to BlueG's mysql and i'm using the R5 version of it. I created an insert query to input some things but it wont work. I dont think theres any error.
When i use "SET" instead of "VALUES" ,like this:
I get this in debug:
And When i use "VALUES" ,like this:
I get this:
Any help?
When i use "SET" instead of "VALUES" ,like this:
Код:
new query[50],pass[50],pName[50]; GetPlayerName(playerid,pName,30); mysql_real_escape_string(inputtext,pass); format(query,sizeof(query),"INSERT INTO Users SET Username='%s',Password='%s',Money=10000",pName,pass); mysql_query(query); SendClientMessage(playerid,COLOR_YELLOW,"Successfully Registered"); GivePlayerMoney(playerid,10000);
Код:
[13:17:45] CMySQLHandler::Query(INSERT INTO Users SET Username='Ron_Killings',Pas) - 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)
Код:
format(query,sizeof(query),"INSERT INTO Users VALUES ('%s','%s',1000)",pName,pass);
Код:
[13:29:10] CMySQLHandler::Query(INSERT INTO Users VALUES('Ron_Killings','main',10) - 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)