guys just a quick question. I have a string in a mysql row resembling this
'google.co.nz, stackoverflow.com, facebook.com, grubber.co.nz'
and so on… I would like to search all the rows in the table and check how many times ‘facebook.com’ shows up in all the rows that are like the ones above so to clarify
my rows look like this
-- id -- user -- likes
1 bob facebook.com, google.co.nz, grubber.co.nz, stackoverflow.com
and i would like to check how many times facebook.com shows up in the whole table (in every row)
Assuming every user can only like the same page once, this should work:
PS: Normalize your table, you will run into serious trouble with a layout like this in the very near future!