in reply to BLOBs
use DBI; our $dbh = DBI->connect('DBI:mysql:filemanager:localhost', 'visual', # user name 'not4you', # password { RaiseError => 1 }); my $sth= $dbh->prepare( "INSERT INTO uploadedFiles(fileType,fileName,fileSize,fileData) VALUES + ( ?,?,?,?) "); open(my $fh, 'index.gif' ) or die $!; binmode $fh; #Update, added for podmaster by sporty to the example read( $fh, $var, -s $fh ); $sth->execute('image/gif','index.gif',1471,$var);
-- Bart: God, Schmod. I want my monkey-man.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: BLOBs
by BrowserUk (Patriarch) on Jun 18, 2004 at 12:44 UTC | |
by exussum0 (Vicar) on Jun 18, 2004 at 12:49 UTC | |
by bodmin (Sexton) on Jun 18, 2004 at 13:00 UTC | |
by BrowserUk (Patriarch) on Jun 18, 2004 at 13:55 UTC | |
|
I binmode
by PodMaster (Abbot) on Jun 18, 2004 at 12:48 UTC | |
by pelagic (Priest) on Jun 18, 2004 at 12:50 UTC | |
by nothingmuch (Priest) on Jun 18, 2004 at 21:23 UTC | |
|
Re^2: BLOBs
by bodmin (Sexton) on Jun 18, 2004 at 12:47 UTC |