Hmm. Not really a DBI question but I feel charitable. Beside this might stop
people asking in the future. See the code below.
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 08, 2001 12:50 PM
>To: [EMAIL PROTECTED]
>Subject: Exporting Data
>
>
>Hello,
>
>I'm trying come up with a fast and easy way to export all the 
>data from a table
>into a file, tab delimited, but haven't alot of success with this. 
>
>What is the best way to pull all the data from a table, then 
>put into a text
>file and have it tab delimited for each column value:
>
>$query = qq|select * from orders|;
>$sth = $dbh->prepare($query);
>$sth->execute();
>
>open(FILE,">$export_file");
>while(my @rows = $sth->fetchrow_array()) {
># THIS IS WHERE I SEEM TO LOOSE IT

#Instead of this
#print FILE @rows . '\t;
print FILE join("\t",@rows) ."\n";


>
>}
>close (FILE)
>
>I get each row into the file, but can't get the tab delimited 
>between each
>column value properly and have a "\n" newline at the end of each @rows
>
>Sorry for the basic question, but something is eluding me on this??
>
>THX's
>Mike(mickalo)Blezien
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Thunder Rain Internet Publishing
>Providing Internet Solutions that work!
>http://www.thunder-rain.com
>Tel: 1(225)686-2002
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>

__________________________________________________________________________
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.


Reply via email to