I have a TEXT column containing a large amount of text (for arguments sake let's assume it's a novel). I need to use MySQL to locate certain words or phrases within the novel. Using INSTR or LOCATE will find a word or phrase and return the position (which is ideal), but it only returns the first instance, I need it to return all instances. Is there a way of doing this?
Asked
Active
Viewed 131 times
0
-
1and what is your code? – Axel Amthor May 15 '15 at 12:12
-
Do you need to know: 1) how many occurrences and where they are, 2) where they are, or 3) just how many occurrences? Perhaps... http://stackoverflow.com/questions/562457/search-for-all-occurrences-of-a-string-in-a-mysql-database – xQbert May 15 '15 at 12:16
-
I need to know how many occurrences and where they are. – Adam May 15 '15 at 12:52