If a user indicates his/her age, say 35, how can I write a query to find results if I have posts with FROM and TO age limits?
Can I do something like
WHERE $user age BETWEEN $fromAge AND $toAGE
Can't seem to be able to find it in manual.
You'd have to have 2 clauses, one for >= $fromAge and one for <= $toAge...
WHERE ($fromAge <= '{$user_age}' AND $toAge >= '{$user_age}')