CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Lost trying to count

Print topic Send  topic

Author Message
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

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.