import v1.1.0_RC2 | 2009-09-20
This commit is contained in:
@ -15,9 +15,9 @@
|
||||
* @category Zend
|
||||
* @package Zend_Db
|
||||
* @subpackage Statement
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Mysqli.php 9738 2008-06-19 23:06:36Z peptolab $
|
||||
* @version $Id: Mysqli.php 17693 2009-08-20 16:34:59Z jimbojsb $
|
||||
*/
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ require_once 'Zend/Db/Statement.php';
|
||||
* @category Zend
|
||||
* @package Zend_Db
|
||||
* @subpackage Statement
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
|
||||
@ -81,7 +81,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
|
||||
* @see Zend_Db_Statement_Mysqli_Exception
|
||||
*/
|
||||
require_once 'Zend/Db/Statement/Mysqli/Exception.php';
|
||||
throw new Zend_Db_Statement_Mysqli_Exception("Mysqli prepare error: " . $mysqli->error);
|
||||
throw new Zend_Db_Statement_Mysqli_Exception("Mysqli prepare error: " . $mysqli->error, $mysqli->errno);
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,7 +125,9 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
|
||||
{
|
||||
if ($stmt = $this->_stmt) {
|
||||
$mysqli = $this->_adapter->getConnection();
|
||||
while ($mysqli->next_result()) {}
|
||||
while ($mysqli->more_results()) {
|
||||
$mysqli->next_result();
|
||||
}
|
||||
$this->_stmt->free_result();
|
||||
return $this->_stmt->reset();
|
||||
}
|
||||
@ -199,10 +201,14 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
|
||||
// send $params as input parameters to the statement
|
||||
if ($params) {
|
||||
array_unshift($params, str_repeat('s', count($params)));
|
||||
$stmtParams = array();
|
||||
foreach ($params as $k => &$value) {
|
||||
$stmtParams[$k] = &$value;
|
||||
}
|
||||
call_user_func_array(
|
||||
array($this->_stmt, 'bind_param'),
|
||||
$params
|
||||
);
|
||||
$stmtParams
|
||||
);
|
||||
}
|
||||
|
||||
// execute the statement
|
||||
@ -212,7 +218,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
|
||||
* @see Zend_Db_Statement_Mysqli_Exception
|
||||
*/
|
||||
require_once 'Zend/Db/Statement/Mysqli/Exception.php';
|
||||
throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement execute error : " . $this->_stmt->error);
|
||||
throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement execute error : " . $this->_stmt->error, $this->_stmt->errno);
|
||||
}
|
||||
|
||||
|
||||
@ -224,7 +230,7 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
|
||||
* @see Zend_Db_Statement_Mysqli_Exception
|
||||
*/
|
||||
require_once 'Zend/Db/Statement/Mysqli/Exception.php';
|
||||
throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement metadata error: " . $this->_stmt->error);
|
||||
throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement metadata error: " . $this->_stmt->error, $this->_stmt->errno);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user