Current location: Hot Scripts Forums » Programming Languages » PHP » Compare files in a dir to records in a database


Compare files in a dir to records in a database

Reply
  #1 (permalink)  
Old 10-25-11, 01:48 PM
bknvc bknvc is offline
New Member
 
Join Date: Oct 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Compare files in a dir to records in a database

I have been trying to work out an issue that compares the files in a folder against the records in a database. If the files are not located in the databse then they are written as option in a list/menu selection box in a form for me to choose from. Anyone able to guide in the right direction?

Not looking for anyone to write the code just give em advise with the proper arguments that I will need to perform this function. Want to build the code myself so I fully understand it.

Thanks in advance.

Last edited by bknvc; 10-25-11 at 01:54 PM.
Reply With Quote
  #2 (permalink)  
Old 10-26-11, 11:19 AM
phplabs phplabs is offline
Newbie Coder
 
Join Date: Oct 2011
Posts: 37
Thanks: 0
Thanked 7 Times in 7 Posts
one way to do this could be read all the files in the folder using opendir/readdir functions, then check each file with the database (search by filename, content, md5 checksum, etc) and if there's no match in the database, add that file to the select box.

Last edited by phplabs; 10-26-11 at 11:22 AM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make offline database consistent bubuna Database 1 12-07-10 11:56 AM
Mysql and php database seach for web-site Terezza PHP 0 04-24-10 01:38 PM
Save articals to files or database? webx2000i PHP 6 10-17-04 11:27 AM
Where are MySQL cache files? darkfreak PHP 4 06-21-04 12:30 AM
Classes and config files therat PHP 2 04-04-04 09:41 AM


All times are GMT -5. The time now is 08:52 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.