Ted
|
| Posted: 09/08/2002, 1:11 PM |
|
Ok here is the problem. I am trying to create a report of such. I have a table called customers. In this table i have a field called status. Each customer is given a status number 1 thru 5.
This is what I want to do. I would like to create a report that shows how many of each status I have. for example
Status 1 = 30
Status 2 = 5
Status 3 = 100
Status 4 = 10
Status 5 = 0
I am using CCS and doing this in php4 with a MySQL database. This is urgent. Anyone that can help me it would be greatly appreciated.
|
|
|
 |
Pierre Henriot
|
| Posted: 09/10/2002, 10:23 PM |
|
I am also interested in an answer.
|
|
|
 |
banjo
|
| Posted: 09/10/2002, 11:37 PM |
|
Try:
SELECT statusid, count(statusId) from customer group by StatusId
|
|
|
 |
TonyE
|
| Posted: 09/11/2002, 6:56 AM |
|
Check out article on
http://www.gotocode.com/disc_viewt.asp?mid=14669&s_topic=tonye&
There is a sample SQL code that does a similar thing what you want to acomplish
TonyE
|
|
|
 |
|