Re: [PHP] php cron to check and remove files

2008-03-13 Thread tedd
At 9:35 AM +0100 3/13/08, Steven Macintyre wrote: Hi, I need to be able to do the following procedure; retrieve all items from a mysql db table, then check to see if the files from that table exist on the server (images), if not, to "clean up" and remove the physical file - so that only the

Re: [PHP] php cron to check and remove files

2008-03-13 Thread Per Jessen
Steven Macintyre wrote: > retrieve all items from a mysql db table, then check to see if the > files from that table exist on the server (images), if not, to "clean > up" and remove the physical file - so that only the files from the db > exist. When you are comparing the contents of disk vs. db,

Re: [PHP] php cron to check and remove files

2008-03-13 Thread Aschwin Wesselius
Steven Macintyre wrote: Hi, I need to be able to do the following procedure; retrieve all items from a mysql db table, then check to see if the files from that table exist on the server (images), if not, to "clean up" and remove the physical file - so that only the files from the db exist.

Re: [PHP] php cron to check and remove files

2008-03-13 Thread Aschwin Wesselius
Steven Macintyre wrote: Do you already have some code? Do you got stuck somewhere? No, i didnt even know where to start with the flow; but sitting on the toilet produces wonderfull ideas! What makes sitting on a toilet any difference than sitting anywhere else? Is it a magic toiletsea

Re: [PHP] php cron to check and remove files

2008-03-13 Thread Steven Macintyre
>Do you already have some code? Do you got stuck somewhere? No, i didnt even know where to start with the flow; but sitting on the toilet produces wonderfull ideas! I have the following in mind; list the entire directory into an array, using a foreach to check on the db if the file exists, th

[PHP] php cron to check and remove files

2008-03-13 Thread Steven Macintyre
Hi, I need to be able to do the following procedure; retrieve all items from a mysql db table, then check to see if the files from that table exist on the server (images), if not, to "clean up" and remove the physical file - so that only the files from the db exist. This will run via cron Ha