MySql R33 Query Problem
#1

Hello i have a problem with my mysql register...

I want to initialize the level field with 1 and the cash with 5000$ ... so that the player will start with that ammount!
Код:
stock MySQL_Register(playerid, passwordstring[])
{
    new query[450], pname[24], IP[15];
    GetPlayerName(playerid, pname, 24);
    GetPlayerIp(playerid, IP, 15);
    format(query, sizeof(query), "INSERT INTO playerdata (user, password, level, cash, admin, ban, faction ,IP) VALUES('%s', SHA1('%s'),1, 5000, 0, 0, 0, '%s')", pname,passwordstring,IP);
    new Cache:result = mysql_query(sql,query);
    cache_delete(result);
    Logged[playerid] = 1;
    return 1;
}
and the debug of this part:
Код:
[22:19:30] [DEBUG] mysql_query - connection: 1, query: "INSERT INTO playerdata (user, password, level, cash, admin, ban,", use_cache: true
[22:19:30] [DEBUG] CMySQLQuery::Execute - starting query execution
[22:19:30] [DEBUG] CMySQLQuery::Execute - query was successfully executed within 33.228 milliseconds
[22:19:30] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[22:19:30] [DEBUG] CMySQLHandle::SaveActiveResult - cache saved (id: 2)
[22:19:30] [DEBUG] cache_delete - cache_id: 2, connection: 1
[22:19:30] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[22:19:30] [DEBUG] CMySQLHandle::DeleteSavedResult - result deleted
so if you can see the query is not fully loaded... I don't know.


a wierd thing is that the user and the password are inserted... + THE IP is inserted too...
Reply


Messages In This Thread
MySql R33 Query Problem - by radyx - 16.03.2014, 20:16
Re: MySql R33 Query Problem - by Calabresi - 16.03.2014, 20:22
Re: MySql R33 Query Problem - by radyx - 16.03.2014, 20:27
Re: MySql R33 Query Problem - by Calabresi - 16.03.2014, 20:44
Re: MySql R33 Query Problem - by radyx - 16.03.2014, 20:58
Re: MySql R33 Query Problem - by Calabresi - 16.03.2014, 21:41
Re: MySql R33 Query Problem - by radyx - 16.03.2014, 22:18

Forum Jump:


Users browsing this thread: 2 Guest(s)