Using PostgreSQL with PHP / Scope an Lifetime of $result - Mailing list pgsql-novice

From Martin Ziebart
Subject Using PostgreSQL with PHP / Scope an Lifetime of $result
Date
Msg-id 002801c36b4c$ea6ffc40$0a00a8c0@WINXP1
Whole thread Raw
List pgsql-novice
Hi !
 
The following PHP-Code:

>>    $conn=pg_connect ($conn_string);
 
>>    $query=pg_exec ($conn, $sql_statement);     // it's pg_query for PHP >4.2.0

>>    pg_close
($conn);

 

My question:

What's the scope and lifetime of the $query Resource ?  Can I still use it after calling pg_close ? or do i have to copy all my rows, fields and stuff before calling pg_close.

Suppose I'd use the mentioned Code in a function wich will return $query as a result. Will the return value of the function still be valid and usable ?

Thanks for your help !

 

Martin

please reply to: mNO_SPAMartin_ziebart@web.de remove NO_SPAM to get the email adress

 

 

pgsql-novice by date:

Previous
From: Andreas Fromm
Date:
Subject: where to find list of special words
Next
From: "Luis H."
Date:
Subject: Re: Using PostgreSQL with PHP / Scope an Lifetime of $result