所有 Mysql 查询似乎都适用于我表中“年龄”的完美预期条件。例如我需要年龄来过滤这个条件从age >=20
to age <=30
,everting 似乎工作但不是年龄。
例如检查这里的链接一个链接
$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";