位置: 编程技术 - 正文

PHP:pg_field_is_null()的用法_PostgreSQL函数

编辑:rootadmin
pg_field_is_null

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

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

(PHP 4 >= 4.2.0, PHP 5)

pg_field_is_null — 测试字段是否为 NULL

说明 int pg_field_is_null ( resource $result , int $row , mixed $field )

pg_field_is_null() 测试字段是否为 NULL。如果字段在给出的行中为 NULL 则返回 1,如果字段在给出的行中不是 NULL 则返回 0。字段可以以列的索引号(数字)方式给出,也可以以字段名(字符串)方式给出。行的编号从 0 开始。

PHP:pg_field_is_null()的用法_PostgreSQL函数

Example #1 pg_field_is_null() 例子

<?php$dbconn=pg_connect("dbname=publisher")ordie("Couldnotconnect");$res=pg_query($dbconn,"select*fromauthorswhereauthor='Orwell'");if($res){if(pg_field_is_null($res,0,"year")==1){echo"Thevalueofthefieldyearisnull.n";}if(pg_field_is_null($res,0,"year")==0){echo"Thevalueofthefieldyearisnotnull.n";}}?>

Note:

本函数以前的名字为 pg_fieldisnull()。

PHP:pg_fetch_row()的用法_PostgreSQL函数 pg_fetch_row(PHP4,PHP5)pg_fetch_row提取一行作为枚举数组说明arraypg_fetch_row(resource$result[,int$row])pg_fetch_row()根据指定的result资源提取一行数据(记录)作为数组

PHP:pg_fetch_result()的用法_PostgreSQL函数 pg_fetch_result(PHP4=4.2.0,PHP5)pg_fetch_result从结果资源中返回值说明mixedpg_fetch_result(resource$result,int$row,mixed$field)pg_fetch_result()根据由pg_query()返回的result资源返回

PHP:pg_fetch_array()的用法_PostgreSQL函数 pg_fetch_array(PHP4,PHP5)pg_fetch_array提取一行作为数组说明arraypg_fetch_array(resource$result[,int$row[,int$result_type]])pg_fetch_array()返回一个与所提取的行(元组/记录)

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

上一篇:PHP:pg_field_name()的用法_PostgreSQL函数

下一篇:PHP:pg_fetch_row()的用法_PostgreSQL函数

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

鄂ICP备2023003026号

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

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