Mysql wont work?
#1

Okay im using this code:
pawn Код:
public ClubCarTimer()
{
    new Query[128], rows, fields, i = 0, Day, Month, Year, Date[128];
    getdate(Year, Month, Day);
    format(Date, sizeof(Date), "%02d-%02d-%02d", Day, Month, Year);
    format(Query, sizeof(Query), "SELECT * FROM ClubCars");
    mysql_function_query( Handle, Query, false, "", "" );
    cache_get_data( rows, fields, Handle);
   
    while(rows > i < MAX_CLUBCARS)
    {
        cache_get_row(i, 3 , ClubVehicles[i][ExpireDate], Handle, 24);
        if(strmatch(ClubVehicles[i][ExpireDate], Date))
        {
       
        }
    }
    return 1;
}
But theres always a problem with the connection. Even though when i join mysql is used and runs fine.
This is the error:
[15:38:24] errorid: 2013 | error: "Lost connection to MySQL server during query" | callback: "" | query: "SELECT * FROM ClubCars" | connectionHandle: 1
Reply
#2

You cannot immediately fetch the result after a threaded query is sent. That is the whole point of threading! Queries that return a result set (SELECT, SHOW, DESCRIBE) must use a callback.
Reply
#3

Example? D:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)