SA-MP Forums Archive
MySQL R6 functions with R7 functions - 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 R6 functions with R7 functions (/showthread.php?tid=353939)



MySQL R6 functions with R7 functions - Tee - 25.06.2012

I'm doing a little check in my script to see whether an account exists and following that is around 150 or more lines of code which will be executed if the account does exist. I just want to find out how would I use the old functions with the new ones to execute this. Would it be something like this?

pawn Code:
format(query,sizeof(query),"SELECT `Name` FROM `accounts` WHERE `Name`='%s'",escapename);
mysql_function_query(1,query,true,"","");
mysql_store_result();
//etc...
I've seen where mysql_store_result() can be used in the R7 version.


Re: MySQL R6 functions with R7 functions - MP2 - 25.06.2012

I assume you need to use mysql_store_result in the callback (which you've left blank ("", "")). I have yet to experiment with this myself.