Help with MDB2 executeMulitple

From: Date: Thu, 09 Oct 2008 18:51:14 +0000
Subject: Help with MDB2 executeMulitple
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29323@lists.php.net to get a copy of this message
I'm having problems with executeMultiple. I receive the following error message & stack trace: PHP Fatal error: Call to undefined method MDB2_Error::execute() in C:\\PHP\\PEAR\\MDB2\\Extended.php on line 644 PHP Stack trace: PHP 1. {main}() C:\\Apache\\htsdocs\\maintenance\\test.php:0 PHP 2. Maintenance->prepareExecuteMultiple() C:\\Apache\\htsdocs\\maintenance\\test.php:32 PHP 3. MDB2_Extended->executeMultiple() C:\\Apache\\htsdocs\\maintenance\\class.Maintenance.php:348 Here is my class function: public function prepareExecuteMultiple($ttStatement, $sData) { //sData must be a numerically indexed array. $fReturn = false; $xStmt = ""; if ($this->fHasInited) { $this->pMyCxn->loadModule('Extended'); $xStmt = $this->pMyCxn->prepare($ttStatement); $fExec = $this->pMyCxn->extended->executeMultiple($xStmt, $sData); if ($fExec) { $fReturn = true; } else { $this->ttErrMsg = $fExec->getMessage(); } $xStmt->free(); } return $fReturn; } And here is the code that calls that function: $ttStmt = "INSERT INTO Roles VALUES (?,?,?)"; $sData = array(array($xiUserKey,'Company','Shopper'), array($xiUserKey,'Company','Call Manage'), array($xiUserKey,'NSC','IT'), array($xiUserKey,'NSC','Intg Mgr')); $fInsertRoles = $xMain->prepareExecuteMultiple($ttStmt, $sData); I use autoExecute earlier in the code for both "Select" and "Insert" queries with no issue. I see that class MDB2_Extended extends MDB2_Module_Common, but the function "execute()" is located in class MDB2_Statement_Common. Is this a problem? Is my understanding totally wrong? Thanks in advance for any help.

« previous php.pear.general (#29323) next »