我开始将代码输入总共7个输入字段4复选框和4个输入文本字段 当我使它工作正常但看起来像mysql中的搜索数据,其中匹配输入1或输入2匹配variable1和variable2之间的大小在size1和size2之间
$fetch=mysql_query("select * from diamonds where diamond-color='".$red."' or diamond-color_pink='".$pink."' and diamond_price between '".$min_price."' and '".$max_price."'");
答案 0 :(得分:0)
试试这个:
select * from diamonds
where diamond_price between 1000 and 10000
and (diamond-color ='red' or diamond-color_pink='pink')
替换相应的变量。