SA-MP Forums Archive
Mysql - multiple queryes. - 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 - multiple queryes. (/showthread.php?tid=579401)



Mysql - multiple queryes. - Adi007 - 26.06.2015

Hello,

Is there a problem if i use multiple queryes in one stock? Like this:

format(query,sizeof(query),"HERE COMMAND");
mysql_query(connection,query,false);
format(query,sizeof(query),"HERE COMMAND");
mysql_query(connection,query,false);
format(query,sizeof(query),"HERE COMMAND");
mysql_query(connection,query,false);
format(query,sizeof(query),"HERE COMMAND");
mysql_query(connection,query,false);

I ask if is wrong this, because sometimes my string, "query", isn't cleared before formatting it, and that result a wrong query.


Re: Mysql - multiple queryes. - Prokill911 - 26.06.2015

ZzZz

Pretty much completely wrong...

Example
PHP код:
new g_mysql_handle;
g_mysql_handle mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_DATABASE,MYSQL_PASSWORD);
format(querysizeof(query), "Syntax here");
mysql_function_query(g_mysql_handlequerytrue"CALL-BACK-IF-ANY""WHAT TO PASS"); 
Call-back-if-any - If you have a callback.. Put it there... If not
Replace it with ""
WHAT TO PASS..
Example.. PlayerID... "s",playerid


Re: Mysql - multiple queryes. - Adi007 - 26.06.2015

There is no mysql_function_query in my plugin / include (a_mysql). I use plugin r39-3 from here:
https://github.com/pBlueG/SA-MP-MySQL/releases
wiki: https://sampwiki.blast.hk/wiki/MySQL/R33


Re: Mysql - multiple queryes. - Adi007 - 28.06.2015

bump