3 messages in com.mysql.lists.perlRe: Extract files from a mysql database
FromSent OnAttachments
Sham Prasad31 Jan 2006 23:27 
Jan Kratochvil31 Jan 2006 23:52 
Jochen Wiedmann01 Feb 2006 02:30 
Subject:Re: Extract files from a mysql database
From:Jan Kratochvil (la@jankratochvil.net)
Date:01/31/2006 11:52:38 PM
List:com.mysql.lists.perl

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 <la@jankratochvil.net> 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