[eluser]codemonkey[/eluser]
Hello, I need some help understanding how I would query a database table (using AR) and provide row counts for each different type of certain data.
Example:
A table named Toys has a column for id, name, type, and condition.
Types range from dolls, cars, and army men
How can I loop through (maybe loop through is the wrong word) and display how many rows contain each toy type excluding a condition of old.
I was thinking I would need to do multiple queries but I'm hoping I can reduce the amount with just one query and sort through the data.
Thanks