Re: SQL query to a file
От | Marcelo Pereira |
---|---|
Тема | Re: SQL query to a file |
Дата | |
Msg-id | Pine.LNX.4.20.0207011027200.2363-100000@ni.hmmg.sp.gov.br обсуждение исходный текст |
Ответ на | Re: SQL query to a file (dan radom <dan@radom.org>) |
Список | pgsql-php |
Hi Dan, Thanks for you answer!! I will look for touch and fopen!! Regards, Marcelo Pereira -- Remember that only God and Esc+:w saves. __ (_.\ Marcelo Pereira | / / ___ | / (_/ _ \__ Matematica/99 - IMECC | _______\____/_\___)___Unicamp_______________/ --- dan radom, with your fast fingers, wrote: :> 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? :> :> :> :> ---------------------------(end of broadcast)--------------------------- :> TIP 4: Don't 'kill -9' the postmaster :> :>
В списке pgsql-php по дате отправления: