dudejma Posted August 7, 2011 Share Posted August 7, 2011 Hey guys, I'm only needing PIREPs submitted by users 001 and 003 to show up if $permission == 2. I have this select query, but it doesn't work. What's missing? I'm not the best at the between/and/or thing: $result = mysql_query("SELECT * FROM pireps WHERE status = '0' AND pilotID = '001' AND pilotID = '003'") Quote Link to comment https://forums.phpfreaks.com/topic/244075-select-query/ Share on other sites More sharing options...
Pikachu2000 Posted August 7, 2011 Share Posted August 7, 2011 PilotID will never equal both 001 and 003. $result = mysql_query("SELECT * FROM pireps WHERE status = '0' AND (pilotID = '001' OR pilotID = '003')") Quote Link to comment https://forums.phpfreaks.com/topic/244075-select-query/#findComment-1253514 Share on other sites More sharing options...
dudejma Posted August 7, 2011 Author Share Posted August 7, 2011 Ahh, that makes since. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/244075-select-query/#findComment-1253519 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.