count of a particular word in a mySQL field
Posted Date Unknown Sonia George Sonia George 1 Comment

I have a text field in MySQL and I need to retrieve the count of a particular word in that field. How can I do it?

See All Responses Below...
Message Rating
Posted on: 08/05/2012

Try this:

SELECT fieldname,COUNT(*) as count FROM tablename GROUP BY fieldnameORDER BY count DESC;

Please Login to Post Your Comments
Name (Max. 100 characters)
Please post your comments here
Select Language
Attach File(Max. Size: 2 MB)
A few simple rules when posting your Comments,
  1. Please post only answers relevant to the topic of discussion.
  2. Please dont misuse this site or do not be abusive, offensive, inappropriate,harass anyone on the boards or post ads or spam. Doing so will delete your inappropriate messages and will block or delete your account on this site. 

Academic Projects