Read the docs and take a look at the dump_results method.
"One call does it all" :-)

(Umm, perhaps that should be a DBI slogan.)

Tim.

On Tue, Aug 07, 2001 at 09:49:47PM -0500, [EMAIL PROTECTED] wrote:
> 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
> 
> print FILE @rows . '\t;
> 
> }
> 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
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 

Reply via email to