> On Wednesday, August 27, 2003, at 12:50  PM, Scott Taylor wrote:
> 
> > Hello all,
> 
> Howdy.
> 
> > I have a database with JPEGs stored in a blob field and I want to
> > display them on an HTML web page with out creating a new 
> file.jpg for 
> > each connection.
> >
> > I'm currently hunting on Google, but I have no idea where 
> to start.  I
> > use Apache 1.3.27, Perl 5.6.1 with DBI->DBD::Interbase on Linux 2.4 
> > machine.  I'm quite comfortable with Perl, DBI, CGI and HTML.
> >
> > Any direction, documentation, script examples, etc. would be great.
> 
> I know of no way to do this, so I'll leave it to others to provide a 
> clever solution.
> 
> However, when I was learning SQL, this is one of the reasons 
> they told 
> us not to store binaries in database fields.  I was taught that it's 
> better to use the filesystem for that kind of thing and just 
> store the 
> document name in the database.  I have no idea if you have any choice 
> about this, but there's my not terribly helpful tip, if you do.
> 
> James
> 

James advice is sound, however if you can't/won't avoid it...

        use CGI qw(header);
        use DBI;
        my $dbh = ...
        print header('image/jpeg');
        my($jpegguts) = $dbh->selectrow_array('SELECT jpegguts FROM myimg WHERE id = 
35');
        print $jpegguts;

HTH

DMuey

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to