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 need,
> however to be able to sort by RELEASE_DATE *and* RELEASE_TIME
> 
> Philosophically, what is the best way to handle this? I'm hesitant to pull
> all the information into an array and use ksort since there are, on average,
> ~1000 messages in this directory which need to be processed.

Smells like a job for a database :)  Otherwise you'll need to either
read all the data in, or create another file heirarchy with the
appropriate redundancy to retrieve in sorted order, which incidentally
probably loads all the file names then sorts. Really it's a database,
database, database issue *grin*.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

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

Reply via email to