inserting BLOB data
Kiran Annaiah <[email protected]> Tue, 11 Dec 2007 14:44:52 -0600
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Message-ID | <[email protected]> |
I am trying to store my file contents in a table. I have never worked with BLOB data types before. I realised that inserting the file contents into the BLOB column is not the same as inserting into a regular column. The file size is about 2.2M. I have set the system variable max_allowed_packet to 3M. Can anyone please give me some ideas about how the file contents can be inserted? Table structure is as follows. +-----------+-----------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+-----------------------+------+-----+---------+----------------+ | file_id | smallint(5) unsigned | NO | PRI | NULL | auto_increment | | file_name | varchar(25) | NO | | | | | file_size | mediumint(8) unsigned | NO | | | | | file | mediumblob | NO | | | | +-----------+-----------------------+------+-----+---------+----------------+ _________________________________________________________________ i’m is proud to present Cause Effect, a series about real people making a difference. http://im.live.com/Messenger/IM/MTV/?source=text_Cause_Effect