Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Count(*)

Status
Not open for further replies.

JohannIcon

Programmer
Sep 3, 2002
440
MT
I know this is a silly question but I forgot how to use Select Count(*), its been quite a while now.

I am using it like this:-

sqlCount="SELECT COUNT(*) AS TotCount FROM pollvoters WHERE pollID=" & pollid
set rsCount=cnn.execute(sqlCount)
response.Write(TotCount)

But nothing is displayed on the screen. At the moment I have no entries in the database, but isn't it supposed to return 0?
Thanks for your help and time
 
Ok now it worked, the only problem is that I also have got to get the 0 votes, ie if it is not in the pollvoters table but exist in the pollAnswers table, but that I will figure out.

Thanks again for your precious help mate!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top