PDA

View Full Version : Altering Query


BamaStangGuy
08-08-2008, 03:19 AM
Can someone please point me in the right direction on altering this query so that it doesn't pull from my banned usergroup, which is id 16.

$result = mysql_query("SELECT user.email, user.username FROM user WHERE (options & 16)'");

Thanks

Dismounted
08-08-2008, 01:30 PM
SELECT user.email, user.username
FROM user
WHERE (options & 16)
AND usergroupid <> 16
AND FIND_IN_SET(16, membergroupids) = 0

BamaStangGuy
08-08-2008, 05:08 PM
Thank you