My mySQL is like this, an id
, and a texts
that have may phrases and some identical as below:
id texts
2 abc,fd4g,oigdu,abc,abc
3 ccc,fff,fff,ccc,iop
My question is how can I show using PHP/mySQL
- per id
2 - abc - 3 times
2 - fd4g - 1 times
2 - oigdu - 1 times
3 - ccc - 2 times
3 - fff - 2 times
3 -iop - 1 times
or searching via the text
abc - 2 times - 2
fd4g - 1 times - 2
oigdu - 1 times - 2
ccc - 2 times - 3
fff - 2 times - 3
iop - 1 times - 3
-
If my mySQL structure was :
id texts
2 abc
2 fd4g
2 oigdu
2 abc
2 abc
3 ccc
3 fff
3 fff
3 ccc
3 iop
would this be easier?