[CodeIgniter][Database][Oracle]一些问题及解决 |
[CodeIgniter][Database][Oracle]一些问题及解决 |
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)); } |
|
|
Lo-Fi Version | Time is now: 2024-12-25 02:29 |