i need the physical files in the sub-folders of album_mod/upload to be deleted if they are not listed anywhere in pic_filename of the phpbb_album table
the subfolder they are in correlates to cat_id
for example if the pic was in cat_id 4 then the location of the pic from phpbb_album_cat
show cat_id 4 is titled Accessories and is in the parent cat of Closet which is in the parent cat of Jessica Simpson so the file would be located at
album_mod/upload/Jessica Simpson/Closet/accessories/