Is there a function for MySQL that will count the number of times a string occurs in another string or column? Basically I want:
SELECT SUB_COUNT(\'my wo
An obvious but unscalable way is like this
(LENGTH(`my_column`) - LENGTH(REPLACE(`my_column`, 'my word', '')))/LENGTH('my word')
Have you investigated Full Text search in MySQL?