位置: 编程技术 - 正文
推荐整理分享PHP:pg_field_type_oid()的用法_PostgreSQL函数,希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!
(PHP 5 >= 5.1.0)
pg_field_type_oid — Returns the type ID (OID) for the corresponding field number
说明 int pg_field_type_oid ( resource $result , int $field_number )pg_field_type_oid() returns an integer containing the OID of the base type of the given field_number in the given PostgreSQL result resource.
You can get more information about the field type by querying PostgreSQLs pg_type system table using the OID obtained with this function. The PostgreSQL format_type() function will convert a type OID into an SQL standard type name.
Note:
If the field uses a PostgreSQL domain (rather than a basic type), it is the OID of the domains underlying type that is returned, rather than the OID of the domain itself.
参数
result
PostgreSQL query result resource, returned by pg_query(), pg_query_params() or pg_execute() (among others).
field_numberField number, starting from 0.
返回值The OID of the fields base type. FALSE is returned on error.
范例
Example #1 Getting information about fields
<?php$dbconn=pg_connect("dbname=publisher")ordie("Couldnotconnect");//Assume'title'isavarchartype$res=pg_query($dbconn,"selecttitlefromauthorswhereauthor='Orwell'");echo"TitlefieldtypeOID:",pg_field_type_oid($res,0);?>以上例程会输出:
参见pg_field_type() - 返回相应字段的类型名称 pg_field_prtlen() - 返回打印出来的长度 pg_field_name() - 返回字段的名字
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_num()的用法_PostgreSQL函数 pg_field_num(PHP4=4.2.0,PHP5)pg_field_num返回字段的编号说明intpg_field_num(resource$result,string$field_name)pg_field_num()返回给定PostgreSQLresult资源中的field_name所代表的列(
标签: PHP:pg_field_type_oid()的用法_PostgreSQL函数
本文链接地址:https://www.jiuchutong.com/biancheng/281490.html 转载请保留说明!友情链接: 武汉网站建设