位置: 编程技术 - 正文

PHP:oci_num_rows()的用法_Oracle函数

编辑:rootadmin
oci_num_rows

推荐整理分享PHP:oci_num_rows()的用法_Oracle函数,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 5, PECL OCI8 >= 1.1.0)

oci_num_rows — 返回语句执行后受影响的行数

说明 int oci_num_rows ( resource $stmt )

oci_num_rows() 返回语句执行后受影响的行数。

Note: PHP:oci_num_rows()的用法_Oracle函数

本函数并不返回 SELECT 查询出来的行数!对于 SELECT 语句本函数将返回用 oci_fetch*() 函数取到缓冲区的行数。

Example #1 oci_num_rows() 例子

<?phpecho"<pre>";$conn=oci_connect("scott","tiger");$stmt=oci_parse($conn,"createtableemp2asselect*fromemp");oci_execute($stmt);echooci_num_rows($stmt)."rowsinserted.<br/>";oci_free_statement($stmt);$stmt=oci_parse($conn,"deletefromemp2");oci_execute($stmt,OCI_DEFAULT);echooci_num_rows($stmt)."rowsdeleted.<br/>";oci_commit($conn);oci_free_statement($stmt);$stmt=oci_parse($conn,"droptableemp2");oci_execute($stmt);oci_free_statement($stmt);oci_close($conn);echo"</pre>";?>

oci_num_rows() 在出错时返回 FALSE。

Note:

在 PHP 5.0.0 之前的版本必须使用 ocirowcount() 替代本函数。该函数名仍然可用,为向下兼容作为 oci_num_rows() 的别名。不过其已被废弃,不推荐使用。

PHP:oci_internal_debug()的用法_Oracle函数 oci_internal_debug(PHP5,PECLOCI8=1.1.0)oci_internal_debug打开或关闭内部调试输出说明voidoci_internal_debug(int$onoff)oci_internal_debug()打开或关闭内部调试输出。设置onoff为0

PHP:oci_new_connect()的用法_Oracle函数 oci_new_connect(PHP5,PECLOCI8=1.1.0)oci_new_connect建定一个到Oracle服务器的新连接说明resourceoci_new_connect(string$username,string$password[,string$db[,string$charset[,int$session_mode]

PHP:oci_new_collection()的用法_Oracle函数 oci_new_collection(PHP5,PECLOCI8=1.1.0)oci_new_collection分配新的collection对象说明OCI-Collectionoci_new_collection(resource$connection,string$tdo[,string$schema])分配一个新的collection

本文链接地址:https://www.jiuchutong.com/biancheng/275243.html 转载请保留说明!

上一篇:PHP:oci_new_descriptor()的用法_Oracle函数

下一篇:PHP:oci_internal_debug()的用法_Oracle函数

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络