MYSQL COUNT(*)

Hi everybody

i have this statement:

[code]dim rs1 as recordset
dim uno as integer
dim BA() as string = Array(“BA1”,“BA2”,“BA3”,“BA4”,“BA5”)

rs1 = app.mDBSmart.SQLSelect(“SELECT (BA1) ,(BA2),(BA3), (BA4), (BA5), count(*) FROM RUOTE WHERE BA1 = ‘1’ OR BA2 = ‘1’ OR BA3 = ‘1’ OR BA4= ‘1’ OR BA5= ‘1’”)[/code]

This stat counts how many number 1 there are in BA1 , BA2 , BA3 etc fields.

The counting is correct, but my question is how i can display the count(*) value ?

i tried this but does not work

for each num as string in BA() uno = rs1.field(num).IntegerValue

any suggestion?

Many thanks

 count(*) as myCount
uno=rs1.field("myCount").Integervalue

Hi Dave

So what is missing was to renaming the field!!!

Got it

Many thanks