SA-MP Forums Archive
MySQL - Server crashes on mysql_fetch_field_row - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MySQL - Server crashes on mysql_fetch_field_row (/showthread.php?tid=277353)



MySQL: mysql_fetch_field_row -> server-crash - Jochemd - 17.08.2011

Hello,

Server is crashing when using mysql_fetch_field_row. I don't know why it is happening. I set up a new database with correct data in it.

pawn Код:
mysql_get_field("Password",StringStore);
I found out server crashes on this line. I don't know why it actually does cause it worked fine before. In Debug.txt there is no more after this:

Код:
[19:22:51] CMySQLHandler::Query(SELECT * FROM `PlayerInfo` WHERE `Playername` = 'Jeff Venturas') - Successfully executed.
[19:22:51] >> mysql_store_result( Connection handle: 1 )
[19:22:51] CMySQLHandler::StoreResult() - Result was stored.
[19:22:51] >> mysql_num_rows( Connection handle: 1 )
[19:22:51] CMySQLHandler::NumRows() - Returned 1 row(s)
[19:22:51] >> mysql_fetch_field_row( Connection handle: 1 )
Here is more script:

pawn Код:
else if(dialogid == DIALOG_LOGIN)
    {
        if(response)
        {
            new strng[129],Store[128],PosString[3][15],StringStore[129];
            WP_Hash(strng,sizeof(strng),inputtext);
            if(strlen(inputtext))
            {
                format(QueryString,sizeof(QueryString),"SELECT * FROM `PlayerInfo` WHERE `Playername` = '%s'",Playername(playerid));
                mysql_query(QueryString);
                mysql_store_result();
                if(mysql_retrieve_row())
                {
                    print("1");
                    mysql_get_field("Password",StringStore);
                    if(!strcmp(StringStore,strng,false))
                    { // Everything after this doesn't matter
Any problems with this?

Jochem


Re: MySQL - Server crashes on mysql_fetch_field_row - Jochemd - 19.08.2011

I updated the code, though it still crashes.