gibbonuk Posted November 22, 2011 Share Posted November 22, 2011 Hi i have a query that changes depending on the users selection for "narrowing" down the results. So i achived this by for each selected wanted i added a "and" opertator to the query. but for one field i want it to be And & or. But what i found is happening is its checking the or with all the ands, not just the field i want it to do. How can have multiple ands but for just one of them i want it to have a or. This all sounded very confusing to write, hope you understand. Thanks Andy Link to comment https://forums.phpfreaks.com/topic/251607-multiple-and-and-one-or-help/ Share on other sites More sharing options...
trq Posted November 22, 2011 Share Posted November 22, 2011 Use () to group your expressions. Link to comment https://forums.phpfreaks.com/topic/251607-multiple-and-and-one-or-help/#findComment-1290371 Share on other sites More sharing options...
gibbonuk Posted November 22, 2011 Author Share Posted November 22, 2011 Thanks! reading back..I cant belive the you understand my question nevermind the fast response. Works a treat. Andy Link to comment https://forums.phpfreaks.com/topic/251607-multiple-and-and-one-or-help/#findComment-1290374 Share on other sites More sharing options...
trq Posted November 22, 2011 Share Posted November 22, 2011 reading back..I cant believe the you understand my question You get used to it after a while. Link to comment https://forums.phpfreaks.com/topic/251607-multiple-and-and-one-or-help/#findComment-1290376 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.