invalid connection handle.
#1

Hi guys.

I have a very annoying problem with the newest mysql (R7).
The problem is that the MYSQL connects to the database succsessfully but doesn't want to select, udate, insert etc.

Here is my code:
pawn Код:
forward ProverkaAkaunt(account[]);

stock CheckAccountExists(account[])
{
    new query[164];
    format(query, sizeof(query), "SELECT * FROM Igraci WHERE pProfil = '%s'", account);
    printf(query);
// THIS ->  mysql_function_query(connectionHandle, query, true, "ProverkaAkaunt", "%s", account);
    return 1;
}

public ProverkaAkaunt(account[])
{
    print("test"); // DOESN'T PRINT !!!
    new rows, fields;
    cache_get_data(rows, fields);
    if(!rows)
    {
        print(!"not registered account on this server!");
    }
    else
    {
        printf("Account registered");
    }
}
The commented line is causing the mysql error:
Код:
mysql_function_query(connectionHandle, query, true, "ProverkaAkaunt", "%s", account);
The error in mysql_log:
Код:
[08:21:08] [ERROR] "mysql_tquery" - invalid connection handle. (ID = 0).
Here's another interesting thing The ProverkaAkaunt callback it's not calling ! I've noticed that by putting:
pawn Код:
print("test");
But it doesn't print !

So what to do ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)