seems like you have solved your original problem. Congratulations.

Now, for another perspective on this. Is there any pressing reason to store the image in the db? I've never quite understood the reason to store images in a db.

I believe in using a tool for what it was created -- a file system is great for storing files -- let it do its job.

I much rather store in the db the image attributes that I might want to search on, along with an image index as the name of the image, but store the actual image on the file system. I would also create some really simple scheme for limiting the number of images in a given folder (number the folders 0, 1, 2, 3, etc.., and store 0-99.gifs in folder 0, 100-199.gifs in folder 2, etc.). Whatever scheme, just make sure that the OS doesn't have to spin loading or searching through an entire folder. Then use DBI to store various attributes and the name of the image in the db, and just search for that. And use the various file attribute comparison functions to figure out if the image is more recent or now -- a simple timestamp comparison should do.

any way, just another perspective.


In reply to Re: Working with DBI and BLOB by punkish
in thread Working with DBI and BLOB by mhearse

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.