Hi all,
I have got 6 checkbox and their values are stored in a database. What I want to do is I want to write a select query and the query should be...
1) Those who are men between 25 to 46 (this criteria ia must)
2)and if any check box is selected according to preferences the i want to put "or" clause... like "
select * from table where sex="man" and (age>'25 and age<46) or intrest1='$intrest1' or interest2=$interest2 and so on..
what is going wrong.. if I put "or" clause between my checkbox value search the it ignores the first preference..mean it displays all man and women and and do not give the preference to Age and Sex..
Where I am wrong..
Thanx..