Mysql Connection Handle
#1

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(checksizeof(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?!
Reply
#2

If you just starting using MySQL please please please use the latest version!
Reply
#3

Connection handle simply means, the connection id of the server you are connected to, meaning you can use multiple connections at once.
Reply
#4

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).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)