On Mon, 26 Aug 2002, Donald J Miller wrote: > Hello everyone, > > I am trying to create a mysql table to hold either the entire contents > of text or WordPerfect files. I've read about BLOB or TEXT type columns > so I've tried creating a table such as: > > CREATE TABLE filetest(fileid int(5) not null, file BLOB null);
so far, so good ... it will not store more than 65535 bytes in file > I 've created the table and have used LOAD DATA in order to populate the > database however I get numerous errors. WORD documents are binary files. Using LOAD DATA you have to escape them properly. Have a look at the LOAD_FILE(file_name) function instead. > Can someone shed some light as to how to do this correctly? What > would be the proper query to retrieve this file out of mysql? SELECT file FROM filetest WHERE fileid = 12345; Regards, Thomas --------------------------------------------------------------------- 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