0
我直接在phpmyadmin中運行此查詢,它完全返回結果! 但是當我在我的PHP腳本運行此查詢,它返回NULL 在zend中執行查詢返回null
,這是我的DB類:
class Product extends Places_Db_Table_Row_Observable {
protected $_name = 'product';
PUBLIC function getMaxSubcatProduct()
{
$query = $this->getAdapter()->query("select max(c) AS maxcount,id from (select COUNT(*) as c
,product_sub_category_id as id from product group by product_sub_category_id) as max ");
$res = $query->fetchAll();
return $res;
}
}
您好,請寫出了「大衆」在較低的情況下,這是建議,我嘗試解決您的問題 – Jalpesh 2012-07-24 09:25:36
沒有改變!!它返回null – afsane 2012-07-24 15:53:40