php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容

源代码在线查看: function.pg-fetch-result.html

软件大小: 3633 K
上传用户: fengkuangyidao
关键词: php PHP 文档 实际应用
下载地址: 免注册下载 普通下载 VIP

相关代码

												 				  Returns values from a result resource				  				 				 				 pg_fetch_object				 pg_fetch_row				 PostgreSQL Functions				 PHP Manual								 				  pg_fetch_result				  (PHP 4 >= 4.2.0, PHP 5)pg_fetch_result — Returns values from a result resource								 								 				  Description				  				   string pg_fetch_result				    ( resource $result				   , int $row				   , mixed $field				   )								  				   string pg_fetch_result				    ( resource $result				   , mixed $field				   )								  				   pg_fetch_result() returns the value of a particular				   row and field (column) in a PostgreSQL result resource.				  				  Note: 				   				    This function used to be called pg_result().				   				  				 												 				  Parameters				  				   								    								     result												     								      				       PostgreSQL query result resource, returned by pg_query(),				       pg_query_params() or pg_execute()				       (among others).				      				     								    								    								     row												     								      				       Row number in result to fetch.  Rows are numbered from 0 upwards.  If omitted,				       next row is fetched.				      				     								    								    								     field												     								             				       A string representing the name of the field (column) to fetch, otherwise				       an int representing the field number to fetch.  Fields are				       numbered from 0 upwards.				      				     								    								   								  				 												 				  Return Values				  				   Boolean is returned as "t" or "f".  All				   other types, including arrays are returned as strings formatted				   in the same default PostgreSQL manner that you would see in the				   psql program.  Database NULL				   values are returned as NULL.				  				  				   FALSE is returned if row				 exceeds the number				   of rows in the set, or on any other error.				  				 								 				 				  Examples				  				   				    Example #1 pg_fetch_result() example				    								<?php$db = pg_connect("dbname=users user=me") || die();$res = pg_query($db, "SELECT 1 UNION ALL SELECT 2");$val = pg_fetch_result($res, 1, 0);echo "First field in the second row is: ", $val, "\n";?>												    								    The above example will output:				    								First field in the second row is: 2								    				   				  				 								 				 				  See Also				  				   				    pg_query()				    pg_fetch_array()				   				  				 												 pg_fetch_object				 pg_fetch_row				 PostgreSQL Functions				 PHP Manual											

相关资源