All Mysql query seems to work perfect expect condition for ‘age’ from my table. for example i need age to filter this condition from age >=20 to age <=30, everting seems to work but not age.
for example check the link here a link
$sql = "SELECT * FROM `file_records`
WHERE (`country` = '$country' OR '$country' IS NULL)
OR (`gender` = '$gender' OR'$gender' IS NULL)
OR (`cast` = '$cast' OR '$cast' IS NULL)
OR (
(`age` >= '$age_from' OR '$age_from' IS NULL)
AND (`age` <= '$age_to' OR '$age_to' IS NULL)
)
LIMIT 0 , 30";
you choose between and operator for age like this format