Re: Key Word Query

2001-02-27 Thread Steve Ruby

Dale Frohman wrote:
 
 Is there anyway to do a query and search for the most frequent
 word that appears in a particular field in a table?
 
 ie:
 
 ITEM DESCRIPTION
 
 
 Blue Dog
 Red Dog
 Yellow Cat
 
 I would want to spit out "Dog" as being the most reoccuring word.
 
 Thanks


that's a little beyond the scope of sql.. you'd have to write your
own stuff to make several queries and find the most used word..

-
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




Re: Key Word Query

2001-02-27 Thread MikemickaloBlezien

On Tue, 27 Feb 2001 13:53:52 -0700, Steve Ruby [EMAIL PROTECTED]
wrote:

You maybe able to adapt the FullText search for this. You can read the details
on this at:
http://www.mysql.com/doc/M/y/MySQL_full-text_search.html

depending what version of MySQL your using.


 
 Is there anyway to do a query and search for the most frequent
 word that appears in a particular field in a table?
 
 ie:
 
 ITEM DESCRIPTION
 
 
 Blue Dog
 Red Dog
 Yellow Cat
 
 I would want to spit out "Dog" as being the most reoccuring word.
 
 Thanks

Mike(mickalo)Blezien

Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225) 686-2002
=















-
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




Re: Key Word Query

2001-02-27 Thread Web master

I agree, I don't think there is a function in MySql, it will do the job. 
May be you can use the following algorithm

1. fetch all rows item description.
2. Split into words and put it in a array.
3. Create a counter array of the same limit of word array.
4. in a for loop, count number of time that particular word occur. Every 
time it occurs increase the counter and set the matched field to blank.

By setting the feild to blank, you check if the feild is not blank do 
the progressive count, if not skip to the next word. This will increase 
the speed of your counting process.

Just a thought.

Steve Ruby wrote:

 Dale Frohman wrote:
 
 Is there anyway to do a query and search for the most frequent
 word that appears in a particular field in a table?
 
 ie:
 
 ITEM DESCRIPTION
 
 
 Blue Dog
 Red Dog
 Yellow Cat
 
 I would want to spit out "Dog" as being the most reoccuring word.
 
 Thanks
 
 
 
 that's a little beyond the scope of sql.. you'd have to write your
 own stuff to make several queries and find the most used word..
 
 -
 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