Re: ARCHIVO TXT EN PHP+POSTGRESQL

From: "ruben avila" <ravila(at)ciclo2000(dot)com(dot)pe>
To: "Alvaro Herrera" <alvherre(at)surnet(dot)cl>, "Ayuda Postgres" <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: ARCHIVO TXT EN PHP+POSTGRESQL
Date: 2005-06-24 17:32:29
Message-ID: 043a01c578e2$b3fea800$6901a8c0@rubenavila
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

<?
$fp = fopen("/tmp/carpeta/envcrt01.txt","w");
fwrite($fp,tableprint1());
fclose($fp);
system("/usr/bin/unix2dos /tmp/carpeta/envcrt01.txt");
?>
<?
function tableprint1(){
$cn="host=192.168.1.2 user=postgres password=postgres dbname=pysnet
port=5432";
$rs=pg_query($cn,"select * from prueba");

while($lista=pg_fetch_row($rs)){?>
<?
for($q=0;$q<=pg_num_fields($rs);$q++){
$c.=$lista[$q];
}
$c.="\r\n";
}
return $c;
}
?>

ENCRT01.TXT(foxpro bien generado).
envcrt01.txt(php+postgresql mal generado).

Attachment Content-Type Size
ENVCTR01.TXT text/plain 212 bytes
envcrt01.txt text/plain 29 bytes

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2005-06-24 17:49:11 Re: ARCHIVO TXT EN PHP+POSTGRESQL
Previous Message Mario Gonzalez 2005-06-24 16:27:13 RE: Problemas pa conectarme a postgres via php 5