I have a bit of a complex problem. I'm making a script that manages skins (like winamp and ICQ ones) in categories. The problem I have is that when I delete a category I need it to delete the category itself, all the entries in the skins table that belong to that catigory, and all the uploaded skin files. I can do all the mySQL but I don't have a clue on how to delete all the files.
The uploaded file is automaticly saved with the same ID as it's mySQL entrie (for example, the image named 6.gif, corresponds to entrie 6 in the skins table).