diff options
author | robocoder <anthon.pang@gmail.com> | 2011-01-10 21:50:50 +0300 |
---|---|---|
committer | robocoder <anthon.pang@gmail.com> | 2011-01-10 21:50:50 +0300 |
commit | 7191afd6d6bb443708886bb013a4155271ce40d3 (patch) | |
tree | 3d1228f9d062d31354836f629c825ec7bedb88d3 /libs/Zend/Db/Adapter/Oracle.php | |
parent | bae316c9500f56f78aa7b1c596d9ef38b8b50231 (diff) |
fixes #1765 - updating to Zend Framework 1.11.2 with some modifications:
ZF-10888: loadClass() inconsistencies
* Zend/Http/Client.php
* Zend/Uri.php
* Zend/Validate.php
ZF-10890: include_path dependency and inconsistencies
* Zend/Validate/Hostname.php
refs #160 - added Zend_OpenId
git-svn-id: http://dev.piwik.org/svn/trunk@3694 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'libs/Zend/Db/Adapter/Oracle.php')
-rw-r--r-- | libs/Zend/Db/Adapter/Oracle.php | 45 |
1 files changed, 3 insertions, 42 deletions
diff --git a/libs/Zend/Db/Adapter/Oracle.php b/libs/Zend/Db/Adapter/Oracle.php index b803878a64..2e0cc68080 100644 --- a/libs/Zend/Db/Adapter/Oracle.php +++ b/libs/Zend/Db/Adapter/Oracle.php @@ -17,7 +17,7 @@ * @subpackage Adapter * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Oracle.php 20096 2010-01-06 02:05:09Z bkarwin $ + * @version $Id: Oracle.php 23573 2010-12-23 18:20:00Z mikaelkael $ */ /** @@ -147,7 +147,8 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract public function isConnected() { return ((bool) (is_resource($this->_connection) - && get_resource_type($this->_connection) == 'oci8 connection')); + && (get_resource_type($this->_connection) == 'oci8 connection' + || get_resource_type($this->_connection) == 'oci8 persistent connection'))); } /** @@ -603,46 +604,6 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract } /** - * Inserts a table row with specified data. - * - * Oracle does not support anonymous ('?') binds. - * - * @param mixed $table The table to insert data into. - * @param array $bind Column-value pairs. - * @return int The number of affected rows. - */ - public function insert($table, array $bind) - { - $i = 0; - // extract and quote col names from the array keys - $cols = array(); - $vals = array(); - foreach ($bind as $col => $val) { - $cols[] = $this->quoteIdentifier($col, true); - if ($val instanceof Zend_Db_Expr) { - $vals[] = $val->__toString(); - unset($bind[$col]); - } else { - $vals[] = ':'.$col.$i; - unset($bind[$col]); - $bind[':'.$col.$i] = $val; - } - $i++; - } - - // build the statement - $sql = "INSERT INTO " - . $this->quoteIdentifier($table, true) - . ' (' . implode(', ', $cols) . ') ' - . 'VALUES (' . implode(', ', $vals) . ')'; - - // execute the statement and return the number of affected rows - $stmt = $this->query($sql, $bind); - $result = $stmt->rowCount(); - return $result; - } - - /** * Check if the adapter supports real SQL parameters. * * @param string $type 'positional' or 'named' |