Stupid question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have the following:

$dsn = "mysqli://$username:$password@$hostname2/$database";
$options = array(
    'debug' => 3,
    'result_buffering' => false,
  );
  $dbh =& MDB2::factory($dsn, $options);
        if (PEAR::isError($mdb2))
        {
                die($mdb2->getMessage());
        }




function tallyCart($_u_id,$dbh){
       while($row = $result->fetchrow(MDB2_FETCHMODE_ASSOC)) {
                $_showCheckOut=1;
$_pdetail=new ProductDetail($row{'product_ID'}, $row{'product_Quantity'}, $_u_id);
                 $_getSubTotal += $_pdetail->_subTotal;
                 $_counter++;
        }
}

I'm getting:  Call to undefined method MDB2_Error::fetchrow()

anyone have any ideas?  Can I not pass a database handle to a function?

Thanks,
Curtis


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux