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

08-09-2004, 10: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
Linux Hosting(20)
Windows hosting(13)

How could i do this pls tell me

08-09-2004, 03: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)
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