mattnoble Posted July 28, 2007 Share Posted July 28, 2007 Ok so here's the deal. I've been trying to figure out how to go about this for a while and I just can't make sense out of it. I'm going to have a form with a bunch of checkbox options that will pertain to values in a database. Lets say I have A, B, C, D, E, and F options on the form. Each record in the database will have a field that pertains to these values. If the user selects the A, B, C, and D options I want the query to select any record that has at MOST the combination A, B, C, and D. By at most I mean I want it to pull entries that also have just [A and B], or [A, B, and C], or so on, but NONE that have more than E or F. I was just wondering if anyone could help me out. I appreciate it. Link to comment https://forums.phpfreaks.com/topic/62240-solved-query-question-i-cant-figure-out/ Share on other sites More sharing options...
MatMel Posted July 28, 2007 Share Posted July 28, 2007 A WHERE clause like this will do: SELECT .... WHERE E = false AND F = false AND any_other_not_selected_checkbox = false Link to comment https://forums.phpfreaks.com/topic/62240-solved-query-question-i-cant-figure-out/#findComment-309784 Share on other sites More sharing options...
mattnoble Posted July 28, 2007 Author Share Posted July 28, 2007 Awesome, obviously I didn't even think about that . Thank you very much! Link to comment https://forums.phpfreaks.com/topic/62240-solved-query-question-i-cant-figure-out/#findComment-309786 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.