mysql_fetch_field_row turn off my server help!
#4

login mysql

pawn Код:
stock MySql_Login(playerid)
{
    new pname[24], savingstring[20];
    new MySql_QueryLogin[500];
    GetPlayerName(playerid, pname, 24);
    format(MySql_QueryLogin, sizeof(MySql_QueryLogin), "SELECT * FROM `playerdata` WHERE `name` = '%s'", PlayerName(playerid));
    mysql_query(MySql_QueryLogin);
    mysql_store_result();
    while(mysql_fetch_row_format(MySql_QueryLogin,"|"))
    {
    mysql_fetch_field_row(savingstring,"score"); SetPlayerScore(playerid,strval(savingstring));
    mysql_fetch_field_row(savingstring,"money"); GivePlayerMoney(playerid,strval(savingstring));

    SystemMsg(playerid,"You are now logged in. Your stats will be auto-saved when you disconnect");
    PLAYERLIST_authed[playerid]=true;
   
    }
    mysql_free_result();
    return 1;
}



last part of debug problem area
pawn Код:
[19:23:42] CMySQLHandler::Query(SELECT * FROM `playerdata` WHERE `name`='VoxPF' AND `password`='reallly') - Successfully executed.
[19:23:42] >> mysql_store_result( Connection handle: 1 )
[19:23:42] CMySQLHandler::StoreResult() - Result was stored.
[19:23:42] >> mysql_num_rows( Connection handle: 1 )
[19:23:42] CMySQLHandler::NumRows() - Returned 1 row(s)
[19:23:42] >> mysql_query( Connection handle: 1 )
[19:23:42] CMySQLHandler::Query(SELECT * FROM `playerdata` WHERE `name` = 'VoxPF') - Successfully executed.
[19:23:42] >> mysql_store_result( Connection handle: 1 )
[19:23:42] CMySQLHandler::StoreResult() - Result was stored.
[19:23:42] >> mysql_fetch_row_format( Connection handle: 1 )
[19:23:42] CMySQLHandler::FetchRow() - Return: VoxPF|amir11211|77126|0|7500|10000|0|0|0|0|0|0|0|0|0|0|0|0|0|6|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
[19:23:42] >> mysql_fetch_field_row( Connection handle: 1 )
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)