General error: 24374 OCIStmtFetch: ORA-24374: define not done before fetch or execute and fetch
问题
$sql='insert into "test"("id") values(4)';
$res=$this->conn->query($sql);

用TP连接Oracle执行insert时数据可以插进去就是有这个错,解决了半天。
解决方法
query() 第四个参数为 true即可。
$res=$this->conn->query($sql,[],false,true);

第四个参数的作用是:是否返回PDO对象

灌个水。
General error: 24374 OCIStmtFetch: ORA-24374: define not done before fetch or execute and fetch的更多相关文章
- c++错误——intermediate.manifest : general error c1010070很傻的错
.\Debug\sadf.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manife ...
- corresponding SQLSTATE values general error
http://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html B.3 Server Error Codes and Message ...
- magento后台登陆被锁定 索引报错的解决:General error: 1205 Lock wait timeout
1. magento在索引的时候用shell,有时候会报错: General error: 1205 Lock wait timeout exceeded 这个时候,是因为行锁的原因,在表中您直接用s ...
- mysql 5.6 General error: 1364 Field mysql 严格模式导致
问题:SQLSTATE[HY000]: General error: 1364 Field 解决方法:set global sql-mode=”NO_AUTO_CREATE_USER,NO_ENGIN ...
- mac android studio 出现 Error: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
Error: SDK location not found. Define location with sdk.dir in the local.properties file or with a ...
- MySQL-proxy代理导致PHP PDO::ATTR_EMULATE_PREPARES的预处理出错,MySQL报General error: 1243错误
背景: 用的ThinkPHP5的框架.(相比之前的3.2版本,版本5都用了PDO处理数据库) 症状: 报错信息: SQLSTATE[HY000]: General error: 1243 Unknow ...
- Laravel 5.5 迁移报错:General error: 1215 Cannot add foreign key constraint
问题 之前一直用的 Laravel 5.4,数据库也是直接写 sql 的,感觉可定制性更强,顺便锻炼下 sql.这次改用了 Laravel 5.5,索性用迁移建库试试,结果报错如下: SQLSTATE ...
- ThinkPHP出现General error: 2006 MySQL server has gone away的解决方法
错误: #13 {main}SQLSTATE[HY000]: General error: 2006 MySQL server has gone awayFILE: \ThinkPHP\Library ...
- Yii 数据库重连告别General error: 2006 MySQL server has gone away
General error: 2006 MySQL server has gone away 错误原因 制造错误 解决办法 最新办法 错误原因 Mysql has gone away MySQL 服务 ...
随机推荐
- [转]关于ImportError: xxxx.so: undefined symbol: PyFPE_jbuf的解决方案
转自: http://blog.csdn.net/zixiximm/article/details/50505921 最近在学着用caffe,总是遇到各种各样奇怪的问题.有时候搜遍整个google也找 ...
- 图数据库cayley+mongo的起航之旅
图数据库,目前比较主流的可能是Neo4j以及cayley了.但是,由于Neo4j只有社区版是免费的,所以,选择cayley作为项目的最终选择! 今天就简单的介绍下,我的起航之旅. 1.安装go语言环境 ...
- PHP 中 call_user_func 函数 和 call_user_func_array 函数的区别
PHP 中 call_user_func() 函数 和 call_user_func_array() 函数都是回调函数,在写接口的时候经常会用到,但是他们有什么区别呢? 它们的第一个参数都是被调用的回 ...
- ML: 聚类算法R包-K中心点聚类
K-medodis与K-means比较相似,但是K-medoids和K-means是有区别的,不一样的地方在于中心点的选取,在K-means中,我们将中心点取为当前cluster中所有数据点的平均值, ...
- MySQL GTID 主从复制错误修复方法
https://yq.aliyun.com/articles/155827?spm=5176.8067842.tagmain.6.RFPTAL MySQL 传统的主从复制方式使用 master_log ...
- Windows Phone Splash Screen
Why to use splash screen? Typically, you should use a splash screen in your app only if your app is ...
- 如何在Visual Studio 2013中连接中国版的Azure
http://diaosbook.com/Post/2014/8/23/connect-azure-cn-in-vs2013 VS2013的Server Explorer在第一次连接Azure的时 ...
- 纯css实现
实现此效果 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 <!DOCTYPE html><html lang=& ...
- uoj#187. 【UR #13】Ernd
http://uoj.ac/problem/187 每个点只能从时间,b+a,b-a三维都不大于它的点转移过来,将点按时间分成尽量少的一些段,每段内三维同时非严格单调,每段内的点可能因为连续选一段而产 ...
- ObjectId与DateTime的互相转换
s会用mongdb中经常会需要用到通过“_id”去检查数据,筛选数据,但是想根据具体时间的id每次都需要做一下转换,这样搜索起来就很简单了. ObjectId转DateTime /// <sum ...