jan@klog.dk wrote:
> Hi there
>
> I get the above mentioned warning when I execute php that contacts the
> postgre database.
>
> I use the following functions to connect to db
>
> Some of the text is in danish :-)
> ...
>
> function sql_spoerg_og_faa_svar($dbcon, $query)
> {
> $resultat = pg_exec($dbcon, $query);
> $resultat_array = array();
> if(!$resultat)
> {
> echo "Kunne ikke udføre: <em>$query</em>";
=====>
> }
> while($raekke = pg_fetch_array($resultat))
> {
> $resultat_array[] = $raekke;
> }
> return $resultat_array;
> }
>
> Anyone who knows whats wrong ?
You are falling through the error and continuing with a bad result handle
up there where I put =====>. Needs a return or something.