SA-MP Forums Archive
mysql help - 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 help (/showthread.php?tid=300515)



mysql help - Unknown123 - 30.11.2011

i got a little prob

explanation: (like i want it)
pawn Код:
new NameFromMYSQL = the name from mysql
new IpFromMYSQL = the ip from mysql
new BantimeFromMYSQL = the temp ban time from mysql
new NameIG = the players name ingame
new IpIG = the players ip ingame

if(NameFromMYSQL == NameIG || IpFromMYSQL == IpIG && BantimeFromMYSQL > 1) return 1;
return 0;
syntax; SELECT * FROM `bans` WHERE `pName` = 'Unknown123' OR `IP` = '155.65.255.255' AND `Bantime` > '1'

something wrong in syntax (no i dont get erros), it select everything (*) even if the "Bantime > 1" but it should select nothing if the Bantime is 0 or less


Re: mysql help - Laronic - 30.11.2011

pawn Код:
"SELECT * FROM `bans` WHERE `Bantime` > '1' AND (`pName` = 'Unknown123' OR `IP` = '155.65.255.255')"



Re: mysql help - Unknown123 - 30.11.2011

Quote:
Originally Posted by CyberGhost
Посмотреть сообщение
pawn Код:
"SELECT * FROM `bans` WHERE `pName` = 'Unknown123' AND `Bantime` > '1' OR `IP` = '155.65.255.255'"
thnx! works!