0 Replies Latest reply on Sep 9, 2008 6:20 AM by Phox68

    MySQL replace() question

      I am trying to <cfoutput> a database table field which may have several hundreds of words. My goal would be to have it display on my cfm page with every word as a hyperlink. So the example would be like this

      the gray fox jumped over the red fence and it was a good time while he did it

      This above sentence would be a small example of the output results from a longtext field in my table. I want write the code to have that field broken up into each individual word and each word then display with a hyperlink on it. I would have the hyperlink in the loop code (I presume).

      It is very similar to what GOOGLE does with their keyword search results. If you look in the upper right corner area of the page, you'll see every word you typed as a key word with a blue hyperlink under each word.

      I have an idea of what to do, but am not sure how to have the query output parse the field as whole words and how to recognize quotes or apostrophes in words, etc.

      Please help.