dialing down through successive fields based on count
i have a table with multiple fields that i want to query until i have less than a recordcount of 20, how should i write the query
table: mystuff
fields: fld1, fld2, fld3, fld4 etc
final recordcount: less than 20
i need to query all of successive field. no MAX as would limit the scope of the query
<cfquery name="myqry" datasource="myds">
SELECT *
FROM mystuff
WHERE fld1 = 'cats'
<cfif records GT 20>
and fld2 = 'siamese'
<cfif records GT 20>
and fld3 = 'white'
and keep dialing through fields until recordcount is less than 20. i do not want to limit the records of each successive field but to get all for the next step down.
</cfquery>
tnx in advance
