September 10th, 2013, 04:44 AM
-
MySql boolean query search
Hi all
I'm a MySql newbie and I need a suggestion.
I have a database with a Varchar field where I stored some info about a program configurations in true|false state:
option1=0
option2=1
option3=1
option4=0
so I saved in the records field xxFieldNamexx the '0110......' string value and I have many of that records.
Now I need to create a query to retrieve all records where exists almost 1 true flag in the corrispondent position, I mean that If I passing. for example, the query SELECT with the searching value = "0110" I would like to retrieve all records with "0100"-"0010"-"0010"... in the field, pratically all records where exists an '1' in the same position.
I thought that this would be do with boolean query operator but I dont know how.
Many thanks in advance.
Lenny
Last edited by lemorlenny; September 10th, 2013 at 10:20 AM.
Reason: Solved.