mysql_tquery - 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_tquery (
/showthread.php?tid=515008)
mysql_tquery -
audriuxxx - 24.05.2014
Hi,
If i specife a callback but i don't create public forward, because i just wanna test there will be no mistake?
Re: mysql_tquery -
gtakillerIV - 24.05.2014
What do you mean? Are you trying to say that you want to create a public callback without forwarding it? If so, you can do that(if you ignore the compiler warning). I wouldn't advise it, though.
Re: mysql_tquery -
audriuxxx - 24.05.2014
No... How to know if any querie is succefully completed or no?
Re: mysql_tquery -
iZN - 24.05.2014
If you wanted to use mysql_tquery without callback you can simply leave the other parameters.
pawn Код:
mysql_tquery(connectionHandle, "UPDATE ..");
About the mistake, you can simply enable
mysql_log and then you can find your issues (if there is otherwise it won't give you any errors, I'd recommend enabling log in HTML which is good in finding out the issues real quick).
Re: mysql_tquery -
audriuxxx - 24.05.2014
Can i do
Код:
mysql_tquery(connectionHandle, "UPDATE ..");
if( mysql_errno( ) != 0)
{
print("ERROR");
}
Can i do mysql_errno? and mysql_errno working with mysql_tquery
Re: mysql_tquery -
Denying - 24.05.2014
You could test it with some code just to see if it works or not. That's what I usually do before coming here and asking.
Anyway, since mysql_errno returns the error code of the error message from the previous MySQL operation I suppose it is possible, though I never tried.
Re: mysql_tquery -
iZN - 24.05.2014
Quote:
Originally Posted by audriuxxx
Can i do
Код:
mysql_tquery(connectionHandle, "UPDATE ..");
if( mysql_errno( ) != 0)
{
print("ERROR");
}
Can i do mysql_errno? and mysql_errno working with mysql_tquery
|
mysql_errno is used if the MySQL connection is successful or not, it is not made for MySQL query result. I already gave you the solution so stop wasting your time in something which doesn't exists. If there will some sort of errors, it will give you error, and if there isn't it won't give you any error.
OnQueryError is called when there is some sort of errors, you can try this?
Re: mysql_tquery -
Denying - 24.05.2014
Quote:
Originally Posted by iZN
mysql_errno is used if the MySQL connection is successful or not, it is not made for MySQL query result. I already gave you the solution so stop wasting your time in something which doesn't exists. If there will some sort of errors, it will give you error, and if there isn't it won't give you any error. OnQueryError is called when there is some sort of errors, you can try this?
|
https://sampwiki.blast.hk/wiki/MySQL/R33#mysql_errno
Though I suppose you're right.