Re: Stupid question
| From: | Jim Lucas | Date: | Tue, 26 Feb 2013 22:41:22 +0000 |
| Subject: | Re: Stupid question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320305@lists.php.net to get a copy of this message | ||
On 02/26/2013 01:27 PM, Curtis Maurand wrote:
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)) {Talking in code. The above two lines tell me... $dbh != $result isset($result) === false
$_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-- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/