help !!! - Mailing list pgsql-php

From Alxander A. Kapralov
Subject help !!!
Date
Msg-id 3D0DB73A.2050108@province.ru
Whole thread Raw
Responses Re: help !!!
List pgsql-php
 function PaperList () {
        global $db;
        $str = "select gazeta.id as i,gorod.id as ig,trim(gazeta.name,'
') as gaz_n, trim(gorod.name,' ') as gor_n from gazeta,gorod where
gazeta.id_gorod=gorod.id order by gazeta.name asc;";
        $result = pg_Exec( $db, $str );
        if ($result = pg_Exec( $db, $str ) != false && ($num =
pg_numrows($result)) ) {
            for ($i = 0; $i < $num; $i++) {
                $r = pg_fetch_object($result, $i);
                    ^^^^^   -- here get error message
                echo "<OPTION VALUE=$r->i> $r->gor_n / $r->gaze_n\n";
            };
        };
    };

Supplied argument is not a valid PostgreSQL result resource in ib.inc
Can any one explain that  !!!!



pgsql-php by date:

Previous
From: Joseph Syjuco
Date:
Subject: Getting array variables from my postgresql function
Next
From: Keary Suska
Date:
Subject: Re: Getting array variables from my postgresql function