Mysql Connection Handle - 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 Connection Handle (
/showthread.php?tid=576419)
Mysql Connection Handle -
nezo2001 - 04.06.2015
I have just started to re-script my script into mysql after Y-Less
Anyway, i got this
Код:
D:\samp037_svr_R1_win32\gamemodes\FM.pwn(703) : error 035: argument type mismatch (argument 1)
D:\samp037_svr_R1_win32\gamemodes\FM.pwn(703) : error 035: argument type mismatch (argument 2)
D:\samp037_svr_R1_win32\gamemodes\FM.pwn(704) : error 035: argument type mismatch (argument 1)
And the code....
PHP код:
mysql_format(check, sizeof(check),"SELECT * FROM users WHERE pName = '%s'",PlayerName(playerid));
new Cache:query = mysql_query(check);
I know that I have to add connection handle, but what is it?!
Re: Mysql Connection Handle -
J0sh... - 04.06.2015
If you just starting using MySQL please please please use the latest version!
Re: Mysql Connection Handle -
Luis- - 04.06.2015
Connection handle simply means, the connection id of the server you are connected to, meaning you can use multiple connections at once.
Re: Mysql Connection Handle -
Konstantinos - 04.06.2015
https://sampwiki.blast.hk/wiki/MySQL/R33#mysql_format
https://sampwiki.blast.hk/wiki/MySQL/R33#mysql_query
I assume "check" is a string to store the query so you forgot the mysql connection handle to both functions. You can get the connection handle by storing the value mysql_connect returns.
Even though, I'd recommend threaded queries (mysql_tquery).