Re: can't retrieve data through PHP

Поиск
Список
Период
Сортировка
От Bruce Young
Тема Re: can't retrieve data through PHP
Дата
Msg-id 20021026174129.26246.qmail@web10406.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: can't retrieve data through PHP  (dan radom <dan@radom.org>)
Ответы Re: can't retrieve data through PHP  (Chadwick Rolfs <cmr@shell.gis.net>)
Список pgsql-php
php connection query:

<?php
        #include('DB/pgsql.php');

    $dbconnect = pg_connect("dbname=campus user=apache");


    $result = pg_exec ($conn, "select * from friends");
    if (!result) {printf ("Error\n"); exit;}

    $numrows = pg_num_rows($result);

    for ($i=0; $i < $numrows; $i++) {
       $r = pg_fetch_row($result, $i);

       for ($j=0; $j < count($r); $j++) {
          echo "$r[$j] ";
       }
       echo "<br>";
       }
    pg_close($dbconnect);
?>


--- dan radom <dan@radom.org> wrote:
> * Bruce Young (hbrucey@yahoo.com) wrote:
> > my script that does insert works correctly, but i get this error
> when
> > retrieving data:
> >
> > Warning: pg_exec(): supplied argument is not a valid PostgreSQL
> link
> > resource in /home/httpd/htdocs/view.php on line 115
> >
> > Warning: pg_num_rows(): supplied argument is not a valid
> PostgreSQL
> > result resource in /home/httpd/htdocs/view.php on line 118
> >
>
> how about showing us the connection and query parts of view.php
>
> dan
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister
> command
>     (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

В списке pgsql-php по дате отправления:

Предыдущее
От: dan radom
Дата:
Сообщение: Re: can't retrieve data through PHP
Следующее
От: Chadwick Rolfs
Дата:
Сообщение: Re: can't retrieve data through PHP