MySQL counting same strings

mysql, php, sql

Solution

try this:

SELECT columnname1,count(columnname1) 
  FROM tablename 
   GROUP BY conlumnname1;

http://sqlfiddle.com/#!2/ecc99/1

Problem

Example of MySQL columns data: ``` stringone stringthree stringtwo stringone stringone stringthree ``` How can I get the following result from MySQL with PHP or mysql_ itself? I don't know strings content. ``` stringone 3x stringthree 2x stringtwo 1x ``` Thank you for your suggestions and direction.

Original source