Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

problem with counting field

hello every body! i have a probem with counting a field in my table an then displaying the result.i need your help.
so i got a table "vct" wich has 2 fields ("vct_name","result")
i just want to select where vct_name="care" and count result on this vct where result="positive". i dont know how to proceed. any suggestion could help.thanks
[345 byte] By [dollakay] at [2007-11-11 9:52:53]
# 1 Re: problem with counting field
sqlStr = "SELECT * FROM vct WHERE vct_name='care' AND result>0"

the result is a simple table contains care .. psitive_value
u can then count this tabel db.RecordCount
If u want to count values in result; a simple for loop until df.eof with a ++ counter for each loop in this field value .
Amahdy at 2007-11-11 17:23:36 >