Re: Extract files from a mysql database

Jan Kratochvil <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
Hi,

just that it got resolved.

On Wed, 01 Feb 2006 08:50:35 +0100, Sham Prasad wrote:
> Thanks jan,
> 
> I tested the code you had sent. Now its working for me.
...
> On 2/1/06, Jan Kratochvil <[email protected]> wrote:
> >
> > On Wed, 01 Feb 2006 08:27:24 +0100, Sham Prasad wrote:
> > ...
> > > Below is my code
> >
> > This script has some typos and cannot work. But still:
> >
> > > #!usr/lib/perl
> > > use DBI;
> > > my $dbh =
> > >
> > DBI->connect("DBI:mysql:databse=Pbugs;host=appletest","root","deltazia",{'RaiseError"
> > > => 1});
> > > my $sth = $dbh->prepare(select thedata from attachments where
> > > attach_id=143") or die "can't prepare statement";
> > > print"Query Results\n";
> > > while(my @row = $sth->fetchrow_array()){
> >
> > > print"@row\n";
> > local *F;
> > open F,">/tmp/file.zip" or die;
> > print F $row[0] or die;
> > close F or die;
> >
> > > }
> > > $sth->execute or die "can't execute statement";
> > > $dbh->disconnect;
> >
> >
> > Is this what you want?
> >
> >
> > Regards,
> > Lace

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.