我正在运行 SQL 查询来搜索我的数据库。我目前可以搜索所有内容,直到我比较价格。
没有价格比较的工作代码
$query = "SELECT * FROM propertie_ids WHERE (`search` LIKE '%".$searchquery."%') AND (`location` = '$location') AND (`bathroom` = '$bathroom') AND (`bedroom` = '$bathroom');
价格比较破代码
$query = "SELECT * FROM propertie_ids WHERE (`search` LIKE '%".$searchquery."%') AND (`location` = '$location') AND (`bathroom` = '$bathroom') AND (`bedroom` = '$bathroom') AND price BETWEEN ('0') AND ('10000000000')";
任何为什么这不起作用的想法,我已经检查过并且我的所有表都正确命名。