有人能告訴我什麼是此錯誤:變量選擇查詢
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什麼時候開始發揮作用?你應該在你的問題中提到這一點。另外我知道我對'&&'邏輯運算符是正確的;-) –