I have a table with 100 or more columns that could have a value “yes” or “no”.
I want to do a select according with the user’s request (checkbox values form) to extract all the rows that have the value at “yes”. So an example could be:
-User selects checkbox1 checkbox4 and checkbox7 and all the other are not selected.
The query could be:
select name from table where (col1 = yes or col4 = yes or col7 = yes) AND (col2= no and col3 = no and all the others columns are set to no)
How to implement this in an android query? And by the way this implementation that i found is not very elegant, could someone suggest me an other implementation for achieve that goal, please?
Here’s the fixed code. It contains some test code.