I have a table called BIO with some biological description that I want to query for keywords in mysql. For example I want to query for "LTR", so I used the code:
select * from BIO where info LIKE '%LTR%';
The result was:
id info
1 Adenylate isopentenyltransferase
2 Glycosyltransferase
3 LTR element
4 Non-LTR retroelement
5 Putative non-LTR
6 Histone LTR element
I also used as suggested in another question (How to implement a Keyword Search in MySQL?) to avoid some issues:
SELECT * FROM BIO WHERE info LIKE CONCAT('%','LTR','%');
And the result was the same.
I do NOT want a result like in the first 2 lines, for example: Glycosyltransferase
I would like to have:
id info
3 LTR element
4 Non-LTR retroelement
5 Putative non-LTR
6 Histone LTR element
How is the best way to do it?