This is a discussion on delete images within the Coding Help forums, part of the Webmaster Help category; ok PHP heads, I need some advice on this. I am after adding new products to the database and also ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||||
| ok PHP heads, I need some advice on this. I am after adding new products to the database and also have some discontinued cause they are not available anymore. To delete those products in one shot is easy through php, but i'll be left with a lot of images on the server that i don't use anymore. in the database i have the path to both sized images (small, large), so by looping through them, i can get the path for it but i need to delete those from folders before the record itself. any example or good reading material?
__________________ :. Web Design & Development Web Design Ireland :. Search Engines Optimization Search Engines Optimization :. Directory Submission Directory Submission :. News & Press Release Ireland GiveItSocks.com :. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories :. I Have 2 Find It Directory SEF Directory |
| |||||
| got it guys. thanks. |
| |||||
| You could possibly store the images directly in the DB?
__________________ Hosting & Domains|Plesk Vps Hosting|Blog Tips|Films.ie|Gadgets|Monetisation Tips|Movie Chat Energise your forum! Click here for info |
| |||||
| Quote:
php has a function "unlink" which was just what i wanted. use within the loop function to delete data from the database i can also get the images deleted from the root folder. |
| |||||
| Louie Maybe, but I might not be that concerned with space
__________________ Hosting & Domains|Plesk Vps Hosting|Blog Tips|Films.ie|Gadgets|Monetisation Tips|Movie Chat Energise your forum! Click here for info |
| |||||
| somebody is in a good mood today. maybe you don't care, but others do, and since i start working on websites i learned that is a bad ideea to store blob data in the database. |
| |||||
| Ah Louie - you don't need to be so touchy PhpAdsNew stores images in its DB and I've been using that for ages
__________________ Hosting & Domains|Plesk Vps Hosting|Blog Tips|Films.ie|Gadgets|Monetisation Tips|Movie Chat Energise your forum! Click here for info |
| |||||
| touchy? who me? miles away from it. i am a happy camper man. |
| Tags |
| delete, images |
| Thread Tools | |
| Display Modes | |
|
|