How can a DB query and Count() go into same... (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


Guest -> How can a DB query and Count() go into same... (3/13/2001 21:20:00)

I can't figure out how to include a Count() of the results brought back by a query.

I have a query:
"Select * FROM results WHERE" & query & ""ORDER BY Timestamp DESC"

Is it possible to include a Count() of the results of the query in the above query?

Thanks for your help,

Pete Moss





Spooky -> RE: How can a DB query and Count() go into same... (3/14/2001 15:19:00)

Theres a couple of ways Pete, one is, if you are looping through records to manualy count them like:

recCount = recCount + 1

do that within the loop and then write the value of "recCount"

Another is to use a client side cursor and use the obj.RecordCount method

------------------
Spooky
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875