IPB

Welcome Guest ( Log In | Register )

> [CodeIgniter][Database][Oracle]一些问题及解决
猫猫草
post 2011-12-13 18:22:19, Tue
Post #1


猫猫猫
***

Group: Power Cat
Posts: 626
Joined: 2006-12-8
Member No.: 2



1、${ciapp}/config/database.php 的示例内容:
代码
$db['default']['hostname'] = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost.example.com)(PORT=1521))(CONNECT_DATA=(SID=dbsid)))';
$db['default']['username'] = 'dbuser';
$db['default']['password'] = 'dbpassword';
$db['default']['database'] = ''; // not used by this Oracle driver
$db['default']['dbdriver'] = 'oci8';


2、不同查询返回相同的结果,解决方法:
修咖 ${cisys}/database/driver/oci8/oci8_driver.php 文件中
代码
function _set_stmt_id($sql)
{
    if ( ! is_resource($this->stmt_id))
    {
        $this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql));
    }
}


代码
function _set_stmt_id($sql)
{
    $this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql));
}

Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 2024-11-1 19:30