grazzman Posted January 3, 2007 Share Posted January 3, 2007 Is their a way to do this?SELECT * FROM `User` WHERE RankType = 'Active' OR 'Retired'So that it will show any that have either Active or Retired and none of the others? Link to comment https://forums.phpfreaks.com/topic/32664-using-or-in-a-mysql-string/ Share on other sites More sharing options...
tcollie Posted January 3, 2007 Share Posted January 3, 2007 SELECT * FROM `User` WHERE RankType = 'Active' OR RankType='Retired' Link to comment https://forums.phpfreaks.com/topic/32664-using-or-in-a-mysql-string/#findComment-152005 Share on other sites More sharing options...
jeeva Posted January 3, 2007 Share Posted January 3, 2007 You can write the query as you mentioned it wont through any sql error, but u cannot get the actual result what u are expected.It will return the first value even though the two conditions are satisfied. Link to comment https://forums.phpfreaks.com/topic/32664-using-or-in-a-mysql-string/#findComment-152007 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.