這是一個非常簡單的問題。我要進去做一些愚蠢的事:Where條款中的多個條件,打破第二個條件
這個查詢回聲出一個行ID號:
$query = "SELECT * FROM userpage WHERE uploaderrating = $rating";
$result = mysql_query($query);
$row1= mysql_fetch_array($result);
echo $row1[id];
當我在一個附加條件(即使條件在SQL數據庫DEFINITELY遇到的回聲添加。不生產任何東西(即變量爲空)的故障代碼是:
$query = "SELECT * FROM userpage WHERE uploaderrating = $rating and reviewer = NULL";
$result = mysql_query($query);
$row1= mysql_fetch_array($result);
echo $row1[id];