Jochem van Dieten wrote: > > I'm trying to do a query of a query returned through CFDIRECTORY. What, if > > any, functions are permitted in such a query? > > Upper() and Lower(). > > > > I need to use the first four > > characters of the file name in the WHERE clause. > > > > <!--- Get a directory listing of all area photos ---> > > <cfdirectory action="list" directory="#photos#" name="dirlisting"> > > How about using the filter attribute?
I don't think it's doable on the first four letters of the filename. The variable 'areas' in the example contains strings such as those shown below - about 50 of them. I could do 50 directory listings, but that's probably slower than looping over the 4000 filenames returned by a complete listing. <cfscript> areas = "'co01','co14','ny02'"; </cfscript> File names are similar to these: co01_001.jpg co01_002.jpg co02_001.jpg co14_001.jpg wy09_001.jpg wy09_002.jpg ny01_001.jpg ny02_001.jpg ny12_001.jpg ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm?link=i:4:138224 Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com