MySQL Forums
Forum List  »  MySQL Query Browser

Get a certain number of words on the left and right of search term
Posted by: Wendell Dantas
Date: April 04, 2011 08:01AM

Hi.
Guys, I'm working on a database and having some problems here. I have a TEXT type column containing students's compositions. How can I select from it like 3 words on the left and 3 words on the right of my search term. For example:
Let's imagine I have a text such as: "This was the way how I learned to fix motorcycles before starting college in my home city". If my search term is "motorcycles", how can I get as a result only "learned to fix motorcycles before starting college" (3 words on the left ad 3 on the right)?

Thanks

Options: ReplyQuote


Subject
Written By
Posted
Get a certain number of words on the left and right of search term
April 04, 2011 08:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.