查询oracle数据库出错。

浏览:761 发布日期:2015/08/18 分类:求助交流
查询oracle;        $stasj='20150521000000';
        $endsj='20150528235959';
       $map['txsj']=array(array('egt',$stasj),array('elt',$endsj));        
        $list=$orahc_db->where($map)->select();
txsj 字段类型:number
会报以下错误;:(

SQLSTATE[HY000]: General error: 932 OCIStmtFetch: ORA-00932: 数据类型不一致: 应为 CHAR, 但却获得 ADT (ext\pdo_oci\oci_statement.c:469)
错误位置
FILE: D:\wamp\ThinkPHP\Library\Think\Db\Driver.class.php  LINE: 288

TRACE
#0 D:\wamp\ThinkPHP\Library\Think\Db\Driver.class.php(288): PDOStatement->fetchAll(2)
#1 D:\wamp\ThinkPHP\Library\Think\Db\Driver.class.php(176): Think\Db\Driver->getResult()
#2 D:\wamp\ThinkPHP\Library\Think\Model.class.php(1360): Think\Db\Driver->query('SELECT * FROM...')
#3 D:\wamp\www\bjhc\wlinapp\Home\Controller\TongjiController.class.php(32): Think\Model->query('SELECT * FROM...')
#4 [internal function]: Home\Controller\TongjiController->tongji()
#5 D:\wamp\ThinkPHP\Library\Think\App.class.php(164): ReflectionMethod->invoke(Object(Home\Controller\TongjiController))
#6 D:\wamp\ThinkPHP\Library\Think\App.class.php(202): Think\App::exec()
#7 D:\wamp\ThinkPHP\Library\Think\Think.class.php(120): Think\App::run()
#8 D:\wamp\ThinkPHP\ThinkPHP.php(97): Think\Think::start()
#9 D:\wamp\www\bjhc\index.php(14): require('D:\wamp\ThinkPH...')
#10 {main}

ThinkPHP3.2.3 { Fast & Simple OOP PHP Framework } -- [ WE CAN DO IT JUST THINK ]
使用$orahc_db->_sql();得到查询句话,直接放在oracle里查,可以得到数据
最佳答案
评论( 相关
后面还有条评论,点击查看>>