obviously, cfdirectory has no idea if your member is M or F
or which
image belongs to which member, only your db does...
so QoQ is your friend:
a) get all images with cfdirectory
b) select necessary records from db - you db must have a
field for the
image filename which will be compared to the results of
cfdirectory query
c) do QoQ to combine the 2 queries and select only images of
M or F
sample code to select all images of M members:
<cfdirectory name="dirQuery" ...>
<cfquery name="dbQuery" ...>
SELECT imageid, imagefilename, gender
FROM images
WHERE gender = 'M'
</cfquery>
<cfquery name="qoq" dbtype="query">
SELECT *
FROM dirQuery, dbQuery
WHERE dirQuery.name = dbQuery.imagefilename
</cfquery>
hth
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/