How can i count data in the database according to their respective group. say 5 people from class A, 10 from B, 30 from C.<BR>A = 5<BR>B = 10<BR>C = 30
select Group, count(*)<BR>from TableName<BR>Group by Group<BR><BR>
how to display it then??
How to display it?what value should i use?
I got this kind of error when i try it your way<BR>ADODB.Recordset error '800a0cc1' <BR><BR>Item cannot be found in the collection corresponding to the requested name or ordinal. <BR>
Sigh<BR>show your sql statement as it appears on the page
Set DB = Connect()<BR>set RS = Server.CreateObject("ADODB.RecordSet")<BR>SQL = "Select Negeri,count(*) from Peserta Group by Negeri"<BR>RS.Open SQL, DB, adOpenStatic, adLockReadOnly, adCmdText
Then <BR>RS(0) will contain the list of Negeri<BR>RS(1) " of counts
how could i display the value of the counts if the table is fixed with the list of negeri?and how can i detect if the value of the respective countery is null??