Not sure how to get it to sort and count
Posted: Mon Mar 03, 2003 6:45 pm
Okay I've got a table that has 3 feilds: id, size, style. Right now, I have a SQL statement pulling the data from the database, and pushing it out to a webpage (using PHP of course). It just pulls everything from the table with that info, and sorts it by id. Here's an example:
Now, what I want it to do is that that information, and make a new table showing how much of each size and style are in the table. Example using above info:
I'm not really sure how I should go about trying to get it to do that, so if you've got any suggestions on how, I'd love to hear them.
Thanks!!!
-ee99ee
Code: Select all
id size style
168 40S TL
169 40S OL
170 40S ODB
171 40S ODB
172 40S ODB
173 40R N
174 40R NCode: Select all
num size style
1 40S TL
1 40S OL
3 40S ODB
2 40R NI'm not really sure how I should go about trying to get it to do that, so if you've got any suggestions on how, I'd love to hear them.
Thanks!!!
-ee99ee