mysql help
#1

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
Reply
#2

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)