i have two fields in a table jobpost like this:-
jp_id jp_min jp_max 1 0 1 2 1 2 3 3 4 4 4 8 5 2 3 6 0 1What i'm trying to find out is if i search for a job with experience 5-9 or 1-5 i should get 4rth record. But if i search for 1-3 exp then i shouldn't get the 4rth record.
I had tried out like this :-
a)SELECT * FROM jobpost WHERE jp_min >=1 AND jp_max <=5; & b)SELECT * FROM jobpost WHERE (jp_min >=1 AND jp_max <=5); (this one gives result of jobpost which requires 1-5 exp only and not that 4rth record 4-8 exp.)but it's not giving me the desired results. Can someone give me hint or so.
Here, we are search for two values between two columns. I found many answer which search for a single value between two columns because thats easy by using between statement in two fields.