Re: [PHP] Exporting data from database using fopen

2004-08-13 Thread Vern
I knew that ;) Some times it takes another set of eyes... Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Exporting data from database using fopen

2004-08-13 Thread Vern
I did. ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Exporting data from database using fopen

2004-08-13 Thread Jason Wong
On Saturday 14 August 2004 00:31, Vern wrote: > I got it. In case anyone is interested. I changed the code so that the > field value was a became the variable $name and it worked. > > $name = $rsITEMS->Fields('item_id'); > fwrite($fp, "$name\n"); But did you take the fopen() out of the while-loo

Re: [PHP] Exporting data from database using fopen

2004-08-13 Thread riese
Hi Vern, Vern wrote: Sorry the previous post got sent prematurely. this one, too. # It does work, however, the problem is in the fwrite($fp, "$rsITEMS->Fields('item_id')\n"); I KNOW, this was the 2nd change in my code-sniplet ;o) what gets written to the file is exactly "$rsITEMS->Field

Re: [PHP] Exporting data from database using fopen

2004-08-13 Thread Vern
I got it. In case anyone is interested. I changed the code so that the field value was a became the variable $name and it worked. $name = $rsITEMS->Fields('item_id'); fwrite($fp, "$name\n"); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Exporting data from database using fopen

2004-08-13 Thread Vern
Sorry the previous post got sent prematurely. It does work, however, the problem is in the fwrite($fp, "$rsITEMS->Fields('item_id')\n"); what gets written to the file is exactly "$rsITEMS->Fields('item_id')" for as many records are return when I want the value to be inserted in the fi

Re: [PHP] Exporting data from database using fopen

2004-08-13 Thread riese
Hi Vern, Vern wrote: I'm trying to write data to a file from a Postgres database using the following code while (!$rsITEMS->EOF) { $fp = fopen("./dump.sql", "w"); fwrite($fp, "$rsITEMS->Fields('item_id')\n"); $rsITEMS->MoveNext(); > [shortened] I wouldn't do, if I were you. It

[PHP] Exporting data from database using fopen

2004-08-13 Thread Vern
I'm trying to write data to a file from a Postgres database using the following code EOF) { //CREATE CSV //OPEN DUMP FILE $fp = fopen("./dump.sql", "w"); //WRITE DATA TO DUMP fwrite($fp, "$rsITEMS->Fields('item_id')\n"); //LOOP $rsITEMS->MoveNext();