mySQL - query problem
#1

well...
When i Compile it..
in this code
pawn Код:
mysql_query("INSERT INTO `users` (`username`, `password`) VALUES ('%s', MD5('%s'))",PlayerName2(playerid),password);
i got this error:
Код:
error 035: argument type mismatch (argument 2)
how i can fix this?
Reply
#2

You need to format the string then query it:
pawn Код:
new
    gQuery[256];

format(gQuery, sizeof(gQuery), "INSERT INTO `users` (`username`, `password`) VALUES ('%s', MD5('%s'))",PlayerName2(playerid),password);
mysql_query(gQuery);
Reply
#3

Quote:
Originally Posted by -Prodigy-
Посмотреть сообщение
You need to format the string then query it:
pawn Код:
new
    gQuery[256];

format(gQuery, sizeof(gQuery), "INSERT INTO `users` (`username`, `password`) VALUES ('%s', MD5('%s'))",PlayerName2(playerid),password);
mysql_query(gQuery);
thanks it work! +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)