位置: 编程技术 - 正文

PHP:pg_delete()的用法_PostgreSQL函数(php destruct)

编辑:rootadmin
pg_delete

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

文章相关热门搜索词:php declare,php destruct,php deprecated,php实现删除功能,php destruct,php delete,php delete,php desc,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 4 >= 4.3.0, PHP 5)

pg_delete — 删除记录

说明 mixed pg_delete ( resource $connection , string $table_name , array $assoc_array [, int $options = PGSQL_DML_EXEC ] )

pg_delete() 删除符合条件的记录,条件在 assoc_array 中以 field=>value 格式给出。如果指定了 option,则 pg_convert() 按照该选项作用于 assoc_array 之上。

参数

connection

PostgreSQL database connection resource.

table_name

Name of the table from which to delete rows.

assoc_array PHP:pg_delete()的用法_PostgreSQL函数(php destruct)

An array whose keys are field names in the table table_name, and whose values are the values of those fields that are to be deleted.

options

Any number of PGSQL_CONV_FORCE_NULL, PGSQL_DML_NO_CONV, PGSQL_DML_EXEC or PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the options then query string is returned.

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE。 Returns string if PGSQL_DML_STRING is passed via options.

范例

Example #1 pg_delete() 例子

<?php$db=pg_connect('dbname=foo');//Thisissafe,since$_POSTisconvertedautomatically$res=pg_delete($db,'post_log',$_POST);if($res){echo"POSTdataisdeleted:$resn";}else{echo"Usermusthavesentwronginputsn";}?>

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

pg_convert() - 将关联的数组值转换为适合 SQL 语句的格式。

PHP:pg_escape_bytea()的用法_PostgreSQL函数 pg_escape_bytea(PHP4=4.2.0,PHP5)pg_escape_bytea转义bytea类型的二进制数据说明stringpg_escape_bytea(string$data)pg_escape_bytea()转义bytea数据类型的二进制字符串,返回转义

PHP:pg_end_copy()的用法_PostgreSQL函数 pg_end_copy(PHP4=4.0.3,PHP5)pg_end_copy与PostgreSQL后端同步说明boolpg_end_copy([resource$connection])pg_end_copy()在处理完pg_put_line()所执行的拷贝操作之后将PostgreSQL前端(

PHP:pg_dbname()的用法_PostgreSQL函数 pg_dbname(PHP4,PHP5)pg_dbname获得数据库名说明stringpg_dbname(resource$connection)pg_dbname()返回给定PostgreSQLconnection资源的数据库名称。如果connection不是有效的PostgreSQL

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

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

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

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

鄂ICP备2023003026号

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

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