Detect db - 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: Detect db (
/showthread.php?tid=619871)
Detect db -
Edw - 23.10.2016
Hello. Any idea that can detect if the connection to the database failed?
I thought the onqueryerror to monitor errors and if more then it has failed. What are you saying?
Re: Detect db -
Kruzz - 23.10.2016
use:
PHP код:
if(handle && mysql_errno(handle) == 0)
handle = the mysql handle;
This condition will be true if the connection was successful.