access data in php

Поиск
Список
Период
Сортировка
От Marc Fromm
Тема access data in php
Дата
Msg-id B0D7C0A3F35FE144A70312D086CBCA9B0213E18F15@ExchMailbox2.univ.dir.wwu.edu
обсуждение исходный текст
Ответы Re: access data in php
Re: access data in php
Список pgsql-admin
If I gather the sql results with this code
$results = pg_query($dbconn,$query);
 
I can check if there is no returned data with this code
$rows = pg_fetch_assoc($result);
 
but if I then use a while loop to display data (if there is data returned) with this code 
while ($row = pg_fetch_array($result)){ . . . }
 
I have to execute this code a second time before the while loop
$results = pg_query($dbconn,$query);
 
If I do not execute the $results line a second time the while loop does not work properly.
 
Why is $results loosing its value when it hits the while loop?
 
Thanks
 
Marc

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

Предыдущее
От: Ray Stell
Дата:
Сообщение: Re: Fwd: ssl database connection problems...
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: access data in php