Mysql eror - 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)
+--- Thread: Mysql eror (
/showthread.php?tid=592533)
Mysql eror -
bigboy81 - 26.10.2015
I make some basic script with user login and register system, but i have eror in log
PHP код:
[00:57:11] ** MySQL Debugging enabled (10/26/15)
[00:57:11]
[00:57:39] >> mysql_format( Connection handle: 1 )
[00:57:39] CMySQLHandler::EscapeString(bigboy81); - Escaped 13 characters to bigboy81.
[00:57:39] >> mysql_query_callback( Connection handle: 1 )
[00:57:39] Passing query SELECT * FROM `users` WHERE `Username` = `bigboy81` | d
[00:57:39] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()
[00:57:39] OnQueryError() - Called.
Re: Mysql eror -
Mencent - 26.10.2015
Hello!
Put this in your script (at the end) and restart the server.
PHP код:
public OnQueryError(errorid, error[], resultid, extraid, callback[], query[], connectionHandle)
{
printf("ErrorID: %d | Error: %s | Query: %s",errorid,error,query);
return 1;
}
Do you get some more information about this error in your log?
Re: Mysql eror -
bigboy81 - 26.10.2015
No i don't have more information about this eror.
I have also made some kind of print for my Query..
PHP код:
public OnQueryFinish(gQuery[])
{
printf("Query %s is finished", Query);
return 1;
}
but that query working when players disconnect form the srerver.
Re: Mysql eror -
Mencent - 26.10.2015
Do you take my code?
Maybe you don't have an error I think it's a note.
But I'm not sure.
Re: Mysql eror -
bigboy81 - 26.10.2015
Quote:
Originally Posted by Mencent
Do you take my code?
Maybe you don't have an error I think it's a note.
But I'm not sure.
|
Yes i also tested with your code but not work.
Re: Mysql eror -
Vince - 26.10.2015
Use the proper quotes. ' and ` look alike but serve different purposes and are are not interchangeable. Backtick (`) for identifiers (columns, tables, databases) only, regular quote (') for strings only. Your query says: select everything from the users table where column username is equal to
column bigboy81.