关于thinkphp 操作oracle 数据库问题

浏览:1705 发布日期:2013/10/27 分类:求助交流 关键字: oraclefu lk
header("Content-Type:text/html; charset=utf-8");
$user=M('Stu');
$userList = $user->select();
$this->assign('UserList', $userList);
$this->display();
这里可以正常的从数据库中读取到数据
----------------------
$M_User = new Model('Stu');
$data['STUCODE'] = $this->_post('stuCode');
$data['STUNAME'] = $this->_post('stuName');
$data['CLASSCODE'] = $this->_post('classCode');
$data['STUSCORE'] = $this->_post('stuScore');

if ($M_User->create()) {
$Query_Result = $M_User->add($data);
if (false !== $Query_Result) {
$this->success('用户添加成功');
} else {
$this->error('用户添加错误');
}
} else {
header("Content-Type:text/html; charset=utf-8");
echo $M_User->getLastSql().'<br><hr>';
exit($M_User->getError() . ' [ <a href="javascript:history.back()">返 回</a> ]');
}

这里增加确出现错误;$M_User->getError()没有任何提示。不过getLastSql()有提示
select a.column_name,data_type,decode(nullable,'Y',0,1) notnull,data_default,decode(a.column_name,b.column_name,1,0) pk from user_tab_columns a,(select column_name from user_constraints c,user_cons_columns col where c.constraint_name=col.constraint_name and c.constraint_type='P'and c.table_name='STU') b where table_name='STU' and a.column_name=b.column_name(+)
[ 返 回 ]
大家知道什么原因吗?
最佳答案
评论( 相关
后面还有条评论,点击查看>>