equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Db |
16 * @package Zend_Db |
17 * @subpackage Statement |
17 * @subpackage Statement |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Oracle.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: Oracle.php 24863 2012-06-02 00:22:47Z adamlundrigan $ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see Zend_Db_Statement |
24 * @see Zend_Db_Statement |
25 */ |
25 */ |
29 * Extends for Oracle. |
29 * Extends for Oracle. |
30 * |
30 * |
31 * @category Zend |
31 * @category Zend |
32 * @package Zend_Db |
32 * @package Zend_Db |
33 * @subpackage Statement |
33 * @subpackage Statement |
34 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
34 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
35 * @license http://framework.zend.com/license/new-bsd New BSD License |
35 * @license http://framework.zend.com/license/new-bsd New BSD License |
36 */ |
36 */ |
37 class Zend_Db_Statement_Oracle extends Zend_Db_Statement |
37 class Zend_Db_Statement_Oracle extends Zend_Db_Statement |
38 { |
38 { |
39 |
39 |
85 * @throws Zend_Db_Statement_Oracle_Exception |
85 * @throws Zend_Db_Statement_Oracle_Exception |
86 */ |
86 */ |
87 protected function _prepare($sql) |
87 protected function _prepare($sql) |
88 { |
88 { |
89 $connection = $this->_adapter->getConnection(); |
89 $connection = $this->_adapter->getConnection(); |
90 $this->_stmt = oci_parse($connection, $sql); |
90 $this->_stmt = @oci_parse($connection, $sql); |
91 if (!$this->_stmt) { |
91 if (!$this->_stmt) { |
92 /** |
92 /** |
93 * @see Zend_Db_Statement_Oracle_Exception |
93 * @see Zend_Db_Statement_Oracle_Exception |
94 */ |
94 */ |
95 require_once 'Zend/Db/Statement/Oracle/Exception.php'; |
95 require_once 'Zend/Db/Statement/Oracle/Exception.php'; |
238 if (!is_array($params)) { |
238 if (!is_array($params)) { |
239 $params = array($params); |
239 $params = array($params); |
240 } |
240 } |
241 $error = false; |
241 $error = false; |
242 foreach (array_keys($params) as $name) { |
242 foreach (array_keys($params) as $name) { |
243 if (!@oci_bind_by_name($this->_stmt, $name, $params[$name], -1)) { |
243 if (!$this->bindParam($name, $params[$name], null, -1)) { |
244 $error = true; |
244 $error = true; |
245 break; |
245 break; |
246 } |
246 } |
247 } |
247 } |
248 if ($error) { |
248 if ($error) { |