Re: SQL query to a file

Поиск
Список
Период
Сортировка
От dan radom
Тема Re: SQL query to a file
Дата
Msg-id 20020701125820.GT25268@lunar.radom.org
обсуждение исходный текст
Ответ на SQL query to a file  (Marcelo Pereira <gandalf@sum.desktop.com.br>)
Ответы Re: SQL query to a file
Список pgsql-php
you can use the PHP touch and fopen functions and then write the rows to the file using a for loop.

dan

* Marcelo Pereira (gandalf@sum.desktop.com.br) wrote:
> Hi All,
>
> I have a connection to a PostgreSQL database, and I would to write a query
> result to a file.
>
> Example:
> # ----8<----------------------------------------------
> $conection = pgconnect(...
> $sql = "select * from mytable";
> $result = pg_exec($conection, $sql);
> # -----8<---------------------------------------------
>
> So, the results are stored in $result, how can I write this to a file?



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

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: PHP + bash script
Следующее
От: Marcelo Pereira
Дата:
Сообщение: Re: PHP + bash script