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'") 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')") 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! Link to comment https://forums.phpfreaks.com/topic/244075-select-query/#findComment-1253519 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.