Can anyone tell me why this won't insert?
#1

So, I've already built a registeration system but I'm trying to improve it yet I'm experiencing a problem with mysql.

I've using the latest version (R39-2) and I can not get it to insert stuff into the line, it creates a line but it won't insert shit into it.

Here's the code:

Код:
GetPlayerIp(playerid, ip, sizeof(ip));
mysql_format(connection, query, sizeof(query), "INSERT INTO accounts (Name, Password, IP) VALUES ('%s', '%e', '%s')", GetName(playerid), inputtext, ip);
mysql_function_query(connection, query, false, "", "");

SetTimerEx("CheckTimer", 2000, false, "i", playerid);
SendClientMessage(playerid, COLOR_RED, "**************************************");
SendClientMessage(playerid, COLOR_GREEN, "You have successfully registered!");
SendClientMessage(playerid, COLOR_GREEN, "PASSWORD USED:");
SendClientMessage(playerid, COLOR_GREEN, inputtext);
SendClientMessage(playerid, COLOR_RED, "**************************************");
I mean it creates a line and all it just doesn't insert the password, I truely do not know why it does that.
Reply
#2

try this:
pawn Код:
GetPlayerIp(playerid, ip, sizeof(ip));
mysql_format(connection, query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Password`, `IP`) VALUES ('%s', '%e', '%s')", GetName(playerid), inputtext, ip);
mysql_function_query(connection, query, false, "", "");

SetTimerEx("CheckTimer", 2000, false, "i", playerid);
SendClientMessage(playerid, COLOR_RED, "**************************************");
SendClientMessage(playerid, COLOR_GREEN, "You have successfully registered!");
SendClientMessage(playerid, COLOR_GREEN, "PASSWORD USED:");
SendClientMessage(playerid, COLOR_GREEN, inputtext);
SendClientMessage(playerid, COLOR_RED, "**************************************");
Reply
#3

Quote:
Originally Posted by Eth
Посмотреть сообщение
try this:
pawn Код:
GetPlayerIp(playerid, ip, sizeof(ip));
mysql_format(connection, query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Password`, `IP`) VALUES ('%s', '%e', '%s')", GetName(playerid), inputtext, ip);
mysql_function_query(connection, query, false, "", "");

SetTimerEx("CheckTimer", 2000, false, "i", playerid);
SendClientMessage(playerid, COLOR_RED, "**************************************");
SendClientMessage(playerid, COLOR_GREEN, "You have successfully registered!");
SendClientMessage(playerid, COLOR_GREEN, "PASSWORD USED:");
SendClientMessage(playerid, COLOR_GREEN, inputtext);
SendClientMessage(playerid, COLOR_RED, "**************************************");
Lol.. I'm so dumb.. I had a stock that saves on OnPlayerUpdate and it had an issue there, therefore it didn't save shit, lol.. Thank you anyways bro, +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)