Kristian,

>Question: Can the MySQL BLOB API access and transfer partial
>blobs. That is, if you want to do the equivalent of a "file *"
>to a BLOB table, the first 10 bytes or so of each BLOB must be
>read in order to guess the type of the BLOB. Is it possible to
>implement this efficiently using the MySQL API?
>
>More specific: Can I efficiently read the bytes x to y from any
>BLOB stored in a MySQL database?

Why not just add another column, Char(3), that contains the file extension? 
Then you wouldn't need to read the blob data.
Or you can use ENUM and define the possible blob types. By having a second 
column you can sort and filter on it.
Another column could be the blob size (in bytes) so you know how much blob 
data is being stored.

Mike


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to