
March 19th, 2005, 10:01 AM
|
|
Registered User
|
|
Join Date: Mar 2005
Posts: 1
Time spent in forums: 24 m 50 sec
Reputation Power: 0
|
|
|
Problem that mysql using asp always returns zero from a count(*)
Hope this is the right forum
using mysql - vbscript and oledb provider
I have a table with 2 records
A direct
Code:
select count(*) from mysqltable
gives 2 as a result
I do the same in asp
Code:
rs.open select count(*) as countervar from sqltable" ,oconn,1,1
Code:
response.write rs(0).value
gives zero and not 2
also
Code:
response.write rs(0)
gives zero and not 2 as expected
I would also like to be able to do mysql calculations e.g. like this
Code:
rs.open "select 10 * 2 as result" ,oconn,1,1
Code:
response.write rs(0)
also gives zero and not 20 as expected
what could be wrong
URL
|