INSERT INTO mysql error [+rep]
#1

hi,

I cant save anything on my mysql and in the error log it says that it creates an error.
This is the error from within the error log:

Код:
[12:12:07] Passing query INSERT INTO `Accounts` SET ('Username', 'pPass') VALUES('116', '223216267' | 
[12:12:07] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()
[12:12:07] OnQueryError() - Called.
This is the line that it is reffering to:

Код:
PlayerInfo[playerid][pPass] = udb_hash(inputtext);
					format(query, sizeof(query), "INSERT INTO `Accounts` SET ('Username', 'pPass') VALUES('%d', '%s'",GetName(playerid),PlayerInfo[playerid][pPass]);
  				  	mysql_function_query(g_connectionHandle, query, false, "DefaultCallback", "");
I will rep+ if you can help.
Reply
#2

pawn Код:
INSERT INTO `Accounts` SET (`Username`, `pPass`) VALUES ('%d', '%s')
Reply
#3

Hello!

PHP код:
format(query,sizeof(query),"INSERT INTO `Accounts` (`Username`,`pPass`) VALUES ('%s','%s')",GetName(playerid),PlayerInfo[playerid][pPass]); 
I think GetName is a string, so you have to use %s instead of %d. Also you can leave "SET" and you forgot a ")".
Reply
#4

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

PHP код:
format(query,sizeof(query),"INSERT INTO `Accounts` (`Username`,`pPass`) VALUES ('%s','%s')",GetName(playerid),PlayerInfo[playerid][pPass]); 
I think GetName is a string, so you have to use %s instead of %d. Also you can leave "SET" and you forgot a ")".
thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)