|
老師您好,
在運用mindex.php程式至我網頁時,出現: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\Ladeco\mindex.php on line 26
而line 26是: <?php while($row_RecCategory=mysql_fetch_assoc($RecCategory)){ ?>
在繫結產品資料時是: //繫結產品目錄資料 $query_RecCategory = "SELECT `category`.`categoryid`, `category`.`categoryname`, `category`.`categorysort`, count(`product`.`'id'`) as productNum FROM `category` LEFT JOIN `product` ON `category`.`categoryid` = `product`.`categoryid` GROUP BY `category`.`categoryid`, `category`.`categoryname`, `category`.`categorysort` ORDER BY `category`.`categorysort` ASC"; $RecCategory = mysql_query($query_RecCategory); 因為我的產品id是文字, 所以我加了單引號. (但就算不加, 也是同樣的結果.)
我查找不出原因來......
|