MySQL Query gone wrong.
#1

Hi there,

I am currently developing my TF2 server as you can see in my signature, and it's MySQL. The problem here is that when I leave, or 'update' my account with my function, my field 'ip' changes to 0.

Here is my function:
pawn Код:
function SavePlayerAccount(playerid)
{
    new ip2[24];
    GetPlayerIp(playerid, ip2, 24);
    format(str, sizeof(str), "UPDATE `playerinfo` SET `ip` = '%s' AND `admin` = %d WHERE `user` = '%s'", ip2, pInfo[playerid][Admin], pName(playerid));
    mysql_query(str);
    printf("%s has just updated their account!", pName(playerid));
    return 1;
}
And the logs say that it correctly queries my IP (or local).

But when I check in the table, our ip's are 0.
Reply


Messages In This Thread
MySQL Query gone wrong. - by Toni - 30.10.2010, 23:12
Re: MySQL Query gone wrong. - by smeti - 31.10.2010, 06:16
Re: MySQL Query gone wrong. - by Toni - 31.10.2010, 06:50

Forum Jump:


Users browsing this thread: 1 Guest(s)