On 10 Apr 2000, Jeremy Kerwin wrote:

> Can somebody tell me how to place a binary file (eg. a DOC file) into a MySQL
> database. I know that it has something to do with setting the type of data
> that goes into the record but I'm not sure on how to do it..
> 
> Any help will be great...

>From manual.html#BLOB (it comes with the MySQL dist):

"7.3.7.2 The BLOB and TEXT types

A BLOB is a binary large object that can hold a variable amount of data.
The four BLOB types TINYBLOB, BLOB, MEDIUMBLOB and LONGBLOB differ
only in the maximum length of the values they can hold. See section
7.3.1 Column type storage requirements. 

The four TEXT types TINYTEXT, TEXT, MEDIUMTEXT and LONGTEXT correspond
to the four BLOB types and have the same maximum lengths and
storage requirements. The only difference between BLOB and TEXT types
is that sorting and comparison is performed in case-sensitive fashion for
BLOB values and case-insensitive fashion for TEXT values. In other words,
a TEXT is a case-insensitive BLOB. 

If you assign a value to a BLOB or TEXT column that exceeds the column
type's maximum length, the value is truncated to fit. "

Hope this helps!

Cheers
Rick W


--
Rick Welykochy || Praxis Services


--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to