IsUserNameAvailable doesn't work
#5

Thank!, but it doesn't fix the bug

Код:
stock IsUserNameAvailable(playername[])
{
    new esc[24],query2[256];
    mysql_real_escape_string(playername,esc);
    format(query2,sizeof(query2),"SELECT COUNT(username) FROM `users` WHERE `username`='%s'",esc);
    mysql_query(query2);
    mysql_store_result();
    if(mysql_fetch_int() > 0) { return 0; }
    else { return 1; }
}
Код:
[00:20:01] CMySQLHandler::Query(SELECT COUNT(username) FROM `users` WHERE `username`='TestName') - An error has occured. (Error ID: 2013, Lost connection to MySQL server during query)

[00:20:01] >> mysql_store_result( Connection handle: 1 )

[00:20:01] CMySQLHandler::StoreResult() - No data to store.

[00:20:01] >> mysql_fetch_int( Connection handle: 1 )

[00:20:01] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result)
Reply


Messages In This Thread
IsUserNameAvailable doesn't work - by BritishBoy - 06.04.2011, 15:15
Re: IsUserNameAvailable doesn't work - by BritishBoy - 06.04.2011, 21:51
Re: IsUserNameAvailable doesn't work - by Sergei - 06.04.2011, 22:00
Re: IsUserNameAvailable doesn't work - by Voldemort - 06.04.2011, 22:01
Re: IsUserNameAvailable doesn't work - by BritishBoy - 06.04.2011, 22:26
Respuesta: IsUserNameAvailable doesn't work - by anonymousx - 07.04.2011, 19:43
Re: IsUserNameAvailable doesn't work - by BritishBoy - 08.04.2011, 09:44

Forum Jump:


Users browsing this thread: 3 Guest(s)