Jump to content

counting numerous names in a sql string


dennismonsewicz

Recommended Posts

Is there anyway to count the number of times a particular name shows up in a sql string and manipulate that particular name?

 

IE: if I have a string like this: dog, cat, horse, dog, fish, donkey, cow, dog, bull

 

And then I wanted to count the number of times dog shows up...

 

any ideas?

Link to comment
https://forums.phpfreaks.com/topic/123991-counting-numerous-names-in-a-sql-string/
Share on other sites

Why is there a CSV in a MySQL column?  There should never, ever, ever, ever, never ever never be a CSV in a column.  Ever.  Read up on database normalization.  If you had a normalized database, this would be quite a simple query.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.