Welcome Guest, Not a member yet? Register   Sign In
Count equal results from DB, how?
#3

[eluser]iGeordie[/eluser]
Try something such as the following:

Code:
SELECT size, COUNT(*) AS size_count FROM T-Shirts GROUP BY size

Should be a simple case of outputting a table row per $row returned as so:

Code:
<tr><td>$row['size']</td><td>$row['size_count']</td></tr>

I could go into more depth, let me know if you want help with the full solution but I expect this should get you started.

Let me know how you get on.


Messages In This Thread
Count equal results from DB, how? - by El Forum - 02-22-2012, 02:53 AM
Count equal results from DB, how? - by El Forum - 02-22-2012, 05:17 AM
Count equal results from DB, how? - by El Forum - 02-22-2012, 06:10 AM
Count equal results from DB, how? - by El Forum - 02-22-2012, 06:32 AM
Count equal results from DB, how? - by El Forum - 02-22-2012, 07:08 AM
Count equal results from DB, how? - by El Forum - 02-22-2012, 08:06 AM
Count equal results from DB, how? - by El Forum - 03-12-2012, 03:11 AM
Count equal results from DB, how? - by El Forum - 03-12-2012, 07:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB