neiltaylormade Posted March 17, 2007 Share Posted March 17, 2007 Hi, hope someone can help! I have a database with the following colums, imageID, imageName, imageDesc, imageFile, imageHeight, imageWidth, imageThumb, imageThumbHeight, and imageThumb Width. I can easily delete a row from the mysql table, galImages, but I also want to delete two files from a directory. The file names are stored in the columns imageFile and imageThumb. Any help will be appreciated. Neil Quote Link to comment Share on other sites More sharing options...
AndyB Posted March 18, 2007 Share Posted March 18, 2007 Retrieve the data in the record you want to delete. Abstract the file names Create the path/to/the/file in each case Use the unlink() command to delete the files Delete the database record Quote Link to comment Share on other sites More sharing options...
neiltaylormade Posted March 18, 2007 Author Share Posted March 18, 2007 Thanks for your reply, I was trying to do this in one full sweep, but I have now been able to achieve this by deleteing the files on one page load, and then deleting the mysql row on the next. Thanks Neil Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.