MySQL problиm - 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 problиm (
/showthread.php?tid=433924)
MySQL problиm -
Noliax8 - 30.04.2013
Hello,
I created a verification script for a ban system, but it's not working !
Код:
format(string, sizeof(string), "SELECT * FROM membres_bans WHERE membreBanID = %d AND timeBanFin < %d AND timeBanFin > 0", Joueur[playerid][pIdSQL], gettime());
mysql_query(string);
Here, the request was executed and there is no problem then :
CMySQLHandler::Query(SELECT * FROM membres_bans WHERE membreBanID = 3 AND timeBanFin < 1367230629 AND timeBanFin > 0) - Successfully executed.
But from this point that's not working :
http://pastebin.com/ku33KdYW
And I'm not finding this request in the Debug.txt !
Can you help me?
Thank you.
Re : MySQL problиm -
Noliax8 - 30.04.2013
Help please
Re: MySQL problиm -
Shoulen - 30.04.2013
Assuming this is for 0.3
You need to thread your queries, also, mysql_query has changed to mysql_function_query.
Refer to this:
https://sampforum.blast.hk/showthread.php?tid=337810
Re : MySQL problиm -
Noliax8 - 30.04.2013
I don't understand. Can you give me a example ?
Re: MySQL problиm -
Shoulen - 30.04.2013
pawn Код:
mysql_function_query(dbHandle, "SELECT * FROM players", true, "OnPlayerListLoad", "");
forward OnPlayerListLoad();
public OnPlayerListLoad() {
}
Re : MySQL problиm -
Noliax8 - 30.04.2013
Can you give a example for vehicle (while) ?