xwishmasterx Posted April 30, 2011 Share Posted April 30, 2011 I have this code below: members_count <= ".$diff." || members_count >= ".$defmemcount." My test says $diff = 6 and $defmemcount = 11, members_count = 14 So how come this returns as if members_count isn't less or equal to 6 OR higher or equal to 11? Quote Link to comment https://forums.phpfreaks.com/topic/235192-need-or-in-select-query/ Share on other sites More sharing options...
fugix Posted April 30, 2011 Share Posted April 30, 2011 try changing it to members_count <= ".$diff." or members_count >= ".$defmemcount." Quote Link to comment https://forums.phpfreaks.com/topic/235192-need-or-in-select-query/#findComment-1208660 Share on other sites More sharing options...
fugix Posted April 30, 2011 Share Posted April 30, 2011 depending on where this is in your query..you may have to close them inside parenthesis Quote Link to comment https://forums.phpfreaks.com/topic/235192-need-or-in-select-query/#findComment-1208661 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.