On Wed, 4 Dec 2002, tan hai shi wrote: > Hi > > I have doubt what to use to store the following: > 1. If I have html data eg. <html><body>my long data are here which include > more html tags</html> etc... > Now, I would like this is stored as what it is and would like to do > query like > searching for specific word or words. Which is the best field type to > use ? "Text" or "BLOB" or etc.. > 2. If I stored the above as BLOB can I query the field for the contains ? > 3. If I stored the MS Words file in BLOB can I run any query to retrieve > the contain of the files ?
M$-Word files are binary files. I store them twice: - once as a BLOB, properly escaped - once piped through wvWare as a TEXT column. Create a fulltext index on the TEXT column. The search is run on the TEXT column and, where a hit is found, the corresponding BLOB may be retrieved. You may do the same for your html files but pipe them through w3m to get the ASCII equivalent. And the *.html file may be stored in a column of type TEXT as well. Thomas Spahni --------------------------------------------------------------------- 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