Hello,
im in a jam, i have tried to use count for my database to count a row, but i was wondering how to count individual things by name.
ex..
+++++++++++++++
+ id + name + color +
+++++++++++++++
+ 1 + joe + blue +
+ 2 + frank + red +
+ 3 + mike + black +
+ 4 + jack + black +
+++++++++++++++
no all i want to do is display a count for each color along instead of displaying 1 blue, 1 red, and 2 black. all i want to do is display black only.. so 2 black, and not the rest of the data? ive seen things, but dont help, like..
<?php
$query = ("SELECT name, count(color) FROM table");
$result = mysql_query($result)// blah blah blah
echo " ".$row['count(color)']."";
?>
i just want to display a single thing not all of them and how man. sorry if im confusing.