RE: [PHP] using pg_query in a function not working
| From: | Marc Fromm | Date: | Fri, 05 Aug 2011 20:15:19 +0000 |
| Subject: | RE: [PHP] using pg_query in a function not working | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-314392@lists.php.net to get a copy of this message | ||
Thanks! Sometimes I'm blind.
-----Original Message-----
From: Jim Lucas [mailto:lists@cmsws.com]
Sent: Friday, August 05, 2011 1:01 PM
To: Marc Fromm
Cc: php-general@lists.php.net
Subject: Re: [PHP] using pg_query in a function not working
On 8/5/2011 12:08 PM, Marc Fromm wrote:
>
> I have to sql statements in functions to use in my code. Even though the echo statements show
> the sql is valid the sql does not seem to execute and I get the error, "PHP Warning:
> pg_fetch_object() expects parameter 1 to be resource, boolean given in . . . line 154 . . ."
> Line 154: while($val = pg_fetch_object($student))
>
$conn is not in scope
>
> Marc Fromm
> Information Technology Specialist II
> Financial Aid Department
> Western Washington University
> Phone: 360-650-3351
> Fax: 360-788-0251
>