Problem with DB Class
| From: | Pete | Date: | Thu, 13 May 2004 11:51:56 +0000 |
| Subject: | Problem with DB Class | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-12462@lists.php.net to get a copy of this message | ||
I am sort of a beginner. I am trying to find out how many products are in a
certain table but it doesn't work.
I guess it is obvious what I am trying to do. Why doesn't this work ?
function returnShopStats()
{
$shopStats= array();
$res1 =& $this->db->query("SELECT count(*) AS num FROM
artikeldetails");
$res2 =& $this->db->query("SELECT count(*) AS num FROM products");
$shopStats['totalNumProdItems'] = $res1->fetchRow();
$shopStats['totalNumProdGroups'] = $res2->fetchRow();
return $shopStats;
}