Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in selectPHP:SQL蜱沒有任何意義
我的代碼是工作的罰款我最後一次檢查,但現在它似乎已經打破。以下是錯誤:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/nerblog/public_html/nerblog/arch.php on line 4
...這裏是第4行代碼:
$q = mysql_query("SELECT * FROM main WHERE month='$month' AND year='$year' LIMIT 12 ORDER BY id DESC");
while ($sql = mysql_fetch_array($q))
這是一個布爾值,因爲你的查詢是無效的 –