Problem with MySQL
#1

I have a little problem, with MySQL. It should check, is there any row, with that player name. But when i checked debug, there was a error message. I have tried a couple of hours, to fix this, but no result.
pawn Код:
CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection)
pawn Код:
format(query, sizeof(query), "SELECT status FROM `playerdata` WHERE user = '%s' LIMIT 1", pname);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row(staatus);
    mysql_free_result();
    mysql_store_result();
    new rows = mysql_num_rows();
    if(rows == 1)
    {
       
            if(strval(staatus) != 3) return KickWithMessage(playerid, V_PUNANE, "Test");
            ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logi Sisse","Kasutaja eksisteerib andmebaasis. Logimiseks sisesta oma {0000FF}parool{FFFFFF} alla lahtrisse!","Logi Sisse","Katkesta"); //Shows our login dialog :).
           
    }
    mysql_free_result();
   
    return 1;
}
Reply
#2

you are not connected to you MYSQL data base try to ping mysql server and see what it returns...
Reply
#3

No, it is connected. When i loaded gamemode, it loaded all houses/businesses/cars/factions successfully, so problem is somewhere else.
Reply
#4

Anyone?
Reply
#5

I FIXED IT! It said that, beacause it didnt have something, to controll, is there any rows. I first mysql_free_result & second mysql_store_result();
Reply
#6

If there is a problem with the database open "DeBug.txt" to see that the script does not like
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)