I'd personally use a SQL DB Class(PHPLib has a good one -
http://phplib.netuse.de )
Also for this you need the File Class which you can get at
http://www.thewebmasters.net

Basicly then just use the FileClass to Produce a Dir Listing then do a 'for'
statement for every file, then query that file name via the SQL Class if
there is no matchs then delete the file



_________________
Nigel Jones
[EMAIL PROTECTED]


>> -----Original Message-----
>> From: elias [mailto:[EMAIL PROTECTED]
>> Sent: Sunday, November 23, 2003 3:14 PM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP-DB] photos in a folder
>>
>>
>> Hey. first of, im really new to PHP, so im still learning.
>>
>> The problem i have now is:
>>
>> i have a dir with 600+ photos, and a database with 500+ photos
>> (due to the
>> fact that when i deleted photos from my webpage, i apparently
>> only deleted
>> it from the database, and not the dir.
>>
>> so.. can someone please tell me how to do a batch script that
>> compares the
>> dir with the database, and deletes the file thats not in the database?
>>
>> thanks
>> /elias
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to