有人能告诉我什么是此错误:变量选择查询
if (isset($_GET['preis']) AND $_GET['preis']==="0-100-euro"){
$preis = "WHERE preis >= 0 and preis <= 100";
}
if (isset($_GET['preis']) AND $_GET['preis']==="100-200-euro"){
$preis = "WHERE preis >= 100 and preis <= 200";
}
if (isset($_GET['preis']) AND $_GET['preis']==="200-300-euro"){
$preis = "WHERE preis >= 200 and preis <= 300";
}
?>
$abfrage = "SELECT * FROM outfits $preis LIMIT $start, $eintraege_pro_seite";
$ergebnis = mysql_query($abfrage);
$ PREIS没有在查询工作
但你应该使用一个开关而不是一个ifelse丛林。 – Popnoodles
elseif和&&而不是AND正在工作。 Bt没有重写规则:RewriteRule^preis - ([^ - ] *)/ $?preis = $ 1 [L]任何想法? – Bunghole
@CaroFiedler RewriteRule什么时候开始发挥作用?你应该在你的问题中提到这一点。另外我知道我对'&&'逻辑运算符是正确的;-) –