<html>
And that's exactly what I'm doing with Perl. Setting the MIME header and
streaming the data and this works very well. Would there be an advantage
to moving to PHP? Faster, easier to code?<br><br>
sub display_image<br>
{<br>
my ($name, $size) = @_;<br>
my $col_name = (defined ($size) ? $size : "image");<br>
my ($dbh, $mime_type, $data);<br>
<x-tab>        </x-tab>$dbh =
WebDB::connect ();<br>
<x-tab>        </x-tab>($mime_type,
$data) = $dbh->selectrow_array (<br>
<x-tab>        </x-tab><x-tab>        </x-tab>"SELECT
mime_type, $col_name FROM image WHERE name = ?", undef, 
$name);<br>
<x-tab>        </x-tab>$dbh->disconnect
();<br>
<x-tab>        </x-tab>error
("Cannot find image named $name") unless defined
($mime_type);<br>
<x-tab>        </x-tab>print
header (-type => $mime_type, -Content_Length => length
($data)),<br>
<x-tab>        </x-tab><x-tab>        </x-tab><x-tab>        </x-tab>$data;<br>
}<br><br>
<br><br>
At 11/27/02 10:58 AM Wednesday, you wrote:<br>
<blockquote type=cite class=cite cite>It looks like PHP is able to do
just that...<br><br>
<a href="http://www.onlamp.com/pub/a/onlamp/2002/05/09/webdb2.html">http://www.onlamp.com/pub/a/onlamp/2002/05/09/webdb2.html</a><br><br>
Basically, set the mime header, stream the data.<br><br>
Andrew<br><br>
Andrew Holm-Hansen wrote:<br>
<blockquote type=cite class=cite cite>I think in Java, you can just
retrieve them as blobs or longs, typecast them, and embed them.  I
don't know about PHP, but it would surely have the same
functionality.<br><br>
Andrew<br><br>
Jonathan Warren wrote:<br>
<blockquote type=cite class=cite cite><br>
<pre>Normally a photo linked into a page is a pointer back to the
image.  It seems to me if you want a photo to be served up from a db
your going to have to some how alias the db pointer in your web server to
a url.  I don't know of anythign to do this.  I don't know if
you can embed the image than the browser should be able to interpret
it.  Basically I am suggesting you dump all your images in a
scripted manner and write php to interpret your pictures directory. 
If you find a way to use images direct from a db please share with the
list.  I would like to know how it is done.

-Jon W


On Wed, Nov 27, 2002 at 09:18:25AM -0600, Joe Catanzaro wrote:
 
</pre><font face="Courier New, Courier"></font><blockquote type=cite class=cite cite><br>
<pre>I'm in the process of building a web page for my family (we just had

baby, blah, blah, blah), and I have several questions.

1. Most of my web page data, such as photos are stored in a MySQL
database. 
To manage the database I use MySQLMan by Gossamer-Threads 
<a href="http://www.gossamer-threads.com/scripts/mysqlman/">http://www.gossamer-threads.com/scripts/mysqlman/</a>
, and it's a great web 
interface to manage the database, but when it lists the photos on the web 
page, it displays them as they are stored, rather than as they should 
appear (funky garbage characters). Can someone recommend a web interface to 
manage a MySQL database? I've heard of PHPmyadmin. Any good? If so, does it 
display photo images rather than a bunch of garbage characters all over the 
screen?

2. To extract these photos and other data (text and video) from the 
database, I normally use Perl's DBI. Is there any advantage in learning PHP 
to create these web pages? The reason I'm asking this question here is 
because of the survey I saw posted on OLUG that most people prefer PHP over 
Perl to create web pages. 
<a href="http://www.olug.org/modules.php?name=Surveys&op=results&pollID=10&mode=&order=&thold=">http://www.olug.org/modules.php?name=Surveys&op=results&pollID=10&mode=&order=&thold=</a>

3. I'm using a MySQL database in hopes all of this is going to scale no 
matter how many photos I've got in that database. Are there any 
disadvantages to building my site in this manner or have I assumed 
correctly that this is a best practice?

Thanks in advance and have a very Happy Thanksgiving,




Joe Catanzaro
<a href="mailto:joecatanzaro@cox.net">joecatanzaro@cox.net</a>

_______________________________________________
OLUG mailing list
<a href="mailto:OLUG@olug.org">OLUG@olug.org</a>
<a href="http://lists.olug.org/mailman/listinfo/olug" eudora="autourl">http://lists.olug.org/mailman/listinfo/olug</a>
    </pre><font face="Courier New, Courier"></font></blockquote><br>
<pre>_______________________________________________
OLUG mailing list
<a href="mailto:OLUG@olug.org">OLUG@olug.org</a>
<a href="http://lists.olug.org/mailman/listinfo/olug" eudora="autourl">http://lists.olug.org/mailman/listinfo/olug</a>
  </pre><font face="Courier New, Courier"></font></blockquote><br>
</blockquote><br>
</blockquote>
<x-sigsep><p></x-sigsep>
<br>
Joe Catanzaro<br>
joecatanzaro@cox.net</html>