Tim Bunce wrote:
> Read the docs and take a look at the dump_results method.
It's good, but if you insert a string containing single quotes and commas, the output
from dump_results is ambiguous.
I was messing with a data string such as:
q{ 'How come', he said? }
The output from dump_results (DBI v1.19) with a couple of values around the string
was:
'1',''How come', he said?','2'
I don't think there's an unambiguous interpretation for the output.
> "One call does it all" :-)
And in the darkness binds them? :-)
> (Umm, perhaps that should be a DBI slogan.)
Maybe - for selectall_array*().
> On Tue, Aug 07, 2001 at 09:49:47PM -0500, [EMAIL PROTECTED] wrote:
> > 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??
--
Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED])
Guardian of DBD::Informix 1.00.PC1 -- see http://www.cpan.org/
#include <disclaimer.h>