SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Not Bad, eh? Justin Sampson's Avatar
    Join Date
    Aug 2000
    Location
    N.S., Canada
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,
    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).

    Any suggestions on how to delete the files?

    Thanks,
    Justin Samposn

  2. #2
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Justin, check out the Unlink() function, this should do it. Just be sure to delete the files before you kill the category.

  3. #3
    Not Bad, eh? Justin Sampson's Avatar
    Join Date
    Aug 2000
    Location
    N.S., Canada
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks That's what I was looking for.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •