SA-MP Forums Archive
mysql_query - 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_query (/showthread.php?tid=625715)



mysql_query - Loinal - 05.01.2017

PHP Code:
mysql_query(bquery); 
Code:
D:\samp folder\(XteMeS) xMs\gamemodes\xMs.pwn(2844) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: mysql_query - GoldenLion - 05.01.2017

Code:
mysql_query(MySQL:handle, const query[], bool:use_cache = true)
You forgot the connection handle. The handle is returned by mysql_connect.
Code:
mysql_query(handle, bquery);
You should also delete the cache after you are done doing stuff like this:
Code:
new Cache:cache = mysql_query(handle, bquery);

//your stuff here

cache_delete(cache);
I suggest you using threaded queries though.


Re: mysql_query - saffierr - 05.01.2017

Tip: Sometimes we all forget some parameters of an actual function, Run pawno as an administrator so you have full access, afterwards, in example, type CreateVehicle( and stop typing a bit to view all the parameters that's required for the specified function.