I have no control over 1) file naming 2) file inclusion in the directory 3) file removal from the directory
This is all being handled through another program written in C. So far I have been able to put the relevant info from each file into the database then display with a simple order by. Now, I'm attempting to get the correct flow for checking if the file is in the database but not in the directory so I can delete it from the database. Trial and error. Susan -----Original Message----- From: Brad Pauly [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2003 1:06 PM To: PHP-General Subject: Re: [PHP] File read and sort question Susan Ator wrote: > The problem with using a database is the files within the directory are > changing on, sometimes, a minute by minute basis. I think reading them into > the database then deleting them when they are deleted from the directory > would be a huge amount of overhead. No? > > Something else which I did not make clear in my previous post; when the > files are removed from the directory I no longer want them displaying in my > web page. [snip] > On Mon, 2003-10-06 at 12:10, Susan Ator wrote: > >>I have a directory with an ever-changing number of files. Some will be >>removed and others added on a continuing basis. >> >>The files are ascii with the following layout: >> >><SENDER> Name >><SUBJECT> Subject line >><RELEASE_DATE> mm/dd/yyyy >><RELEASE_TIME> hh:mm >> >>I can easily get a list of files and pull the necessary information. I Would it be possible to take advantage of the way the files are named? If you included the RELEASE_DATE and RELEASE_TIME in the name of the file it would save you the step of reading the files. Just getting the contents of the directory should provide all the information. Of course you would still need to put that in an array and sort it. - Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php