Quote:
Originally Posted by Xabi
pawn Код:
mysql_format(mysql, query, sizeof(query), "INSERT INTO `users` (`Username` , `Password`, `IP`, VALUES( '%s', '%s', '%s')", Name[playerid], pInfo[playerid][Password], IP[playerid]);
Remove the , after `IP`
|
Yes, you are right remove the
, after IP, but he's missing an bracket, to close the first part.
Quote:
Originally Posted by Scottas
pawn Код:
INSERT INTO `users` (`Username` , `Password`, `IP`) VALUES ('%s', '%s', '%s')
|
This would fix, but can be improved or you will be a victim of SQL Injections, without escaping strings
This should work.
pawn Код:
INSERT INTO `users` (Username , Password, IP) VALUES ('%e', '%e', '%e')