...

View Full Version : how can i show and calculate total records count from tables.



asad
08-09-2004, 11:11 AM
Hi, i have some problem in showing data.

I have two tables
First table(containing Hosting categories)
Second table(Containg catagories data like url,keyword,description.....etc)

I want to display catgories names from first table and then diffrent catagories
total records from second table, like this
ASP.NETHosting(10)
Linux Hosting(20)
Windows hosting(13)
:
:
:
etc


How could i do this pls tell me
THANKS

angst
08-09-2004, 04:21 PM
make a function of it,,
something like,,


Function GetCatCount(CatId)

SQL = "Select Count(*) from Catagories where Cid="&CatId
Set rs = myconn.Execute(SQL)
GetCatCount= rs(0)
rs.close
set rs = nothing
set sql = nothing

End Function


then call it like:


response.write GetCatCount(123)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum