位置: 编程技术 - 正文
推荐整理分享PHP:pg_field_table()的用法_PostgreSQL函数,希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!
(PHP 5 >= 5.2.0)
pg_field_table — Returns the name or oid of the tables field
说明 mixed pg_field_table ( resource $result , int $field_number [, bool $oid_only = false ] )pg_field_table() returns the name of the table that field belongs to, or the tables oid if oid_only is TRUE.
参数result
PostgreSQL query result resource, returned by pg_query(), pg_query_params() or pg_execute() (among others).
field_numberField number, starting from 0.
oid_onlyBy default the tables name that field belongs to is returned but if oid_only is set to TRUE, then the oid will instead be returned.
返回值On success either the fields table name or oid. Or, FALSE on failure.
范例
Example #1 Getting table information about a field
<?php$dbconn=pg_connect("dbname=publisher")ordie("Couldnotconnect");$res=pg_query($dbconn,"SELECTbarFROMfoo");echopg_field_table($res,0);echopg_field_table($res,0,true);$res=pg_query($dbconn,"SELECTversion()");var_dump(pg_field_table($res,0));?>以上例程的输出类似于:
注释Note:
Returning the oid is much faster than returning the table name because fetching the table name requires a query to the database system table.
参见pg_field_name() - 返回字段的名字 pg_field_type() - 返回相应字段的类型名称
PHP:pg_field_type_oid()的用法_PostgreSQL函数 pg_field_type_oid(PHP5=5.1.0)pg_field_type_oidReturnsthetypeID(OID)forthecorrespondingfieldnumber说明intpg_field_type_oid(resource$result,int$field_number)pg_field_type_oid()returnsanintegercontaini
PHP:pg_field_size()的用法_PostgreSQL函数 pg_field_size(PHP4=4.2.0,PHP5)pg_field_size返回指定字段占用内部存储空间的大小说明intpg_field_size(resource$result,int$field_number)pg_field_size()返回PostgreSQLresult中指定字
PHP:pg_field_prtlen()的用法_PostgreSQL函数 pg_field_prtlen(PHP4=4.2.0,PHP5)pg_field_prtlen返回打印出来的长度说明intpg_field_prtlen(resource$result,int$row_number,string$field_name)pg_field_prtlen()返回PostgreSQLresult中得到的
标签: PHP:pg_field_table()的用法_PostgreSQL函数
本文链接地址:https://www.jiuchutong.com/biancheng/281489.html 转载请保留说明!友情链接: 武汉网站建设