June 2nd, 2005, 01:26 PM
Join Date: Dec 2003
Time spent in forums: 4 Days 5 h 32 m 28 sec
Reputation Power: 11
Storing/fetching MSWord files in/from MySql: BLOB or TEXT field
I need to store MS Word files in a MySql database.
I also need to be able to download the same files from the database/server.
The reason for this is that my client want search through the stored docs for specific words and I have no access to using the exec command in PHP on that particular server.
I have created some testing pages: upload.php and download.php.
The field that holds the document is called content.
I have tested both the upload.php and download.php and it works fine.
It actually works fine if the "content" field is defined as BLOB or if it is defined as TEXT.
Works fine if document contains images as well, for both field-types.
Which datatype should I use? BLOB or TEXT?
Why should I use that datatype?
For the time being my client only need to search the text using
.. where content like '%search-word%' ... or ... and ....
It might be that my client want to fulltext index the content field laiter to speed up search.
Number of documents stored: approx 1000 to 5000.