pg_free_result

(PHP 4 >= 4.2.0, PHP 5, PHP 7)

pg_free_result锟酵放诧拷询锟斤拷锟秸硷拷玫锟斤拷诖锟�

说锟斤拷

pg_free_result ( resource $result ) : bool

pg_free_result() 锟斤拷锟节碉拷锟姐担锟侥脚憋拷执锟斤拷时占锟斤拷锟剿癸拷锟斤拷锟节达拷时锟斤拷锟矫★拷锟脚憋拷执锟斤拷锟斤拷虾锟斤拷锟斤拷械牟锟窖拷锟斤拷占锟矫碉拷锟节存都锟结被锟皆讹拷锟酵放★拷锟斤拷锟斤拷锟斤拷锟斤拷锟饺凤拷锟斤拷诮疟锟斤拷胁锟斤拷锟斤拷锟斤拷玫锟斤拷锟窖拷锟斤拷锟剿o拷锟斤拷锟斤拷锟斤拷锟� result 锟斤拷为锟斤拷锟斤拷锟斤拷锟斤拷 pg_free_result() 锟斤拷锟酵凤拷锟叫关碉拷锟节存。锟缴癸拷时锟斤拷锟斤拷 TRUE锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE锟斤拷

Note:

锟斤拷锟斤拷锟斤拷锟斤拷前锟斤拷锟斤拷锟斤拷为 pg_freeresult()锟斤拷

锟轿硷拷 pg_query()锟斤拷

锟斤拷锟斤拷

result

PostgreSQL query result resource, returned by pg_query(), pg_query_params() or pg_execute() (among others).

锟斤拷锟斤拷值

锟缴癸拷时锟斤拷锟斤拷 TRUE锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE锟斤拷

锟斤拷锟斤拷

Example #1 pg_free_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($res10);

echo 
"First field in the second row is: "$val"\n";

pg_free_result($res);
?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

First field in the second row is: 2

锟轿硷拷

  • pg_query() - 执锟叫诧拷询
  • pg_query_params() - Submits a command to the server and waits for the result, with the ability to pass parameters separately from the SQL command text
  • pg_execute() - Sends a request to execute a prepared statement with given parameters, and waits for the result