> You can probably figure ways to streamline this, but I think it may answer
> your basic question.  The best solution is one that works for you
> reliably,
> and there have to be at least 50 ways to do this.  This is just one.

Hmm. Personally I would have thought the best way to do this is to get the
db server to perform as much of the selection work as possible, thus the
suggestion of using a BETWEEN operation in a WHERE clause of an SQL
statement.

In small recordsets it probably wouldn't matter a great deal, but in a
larger recordset you would be returning a large array and having to iterate
through it in PHP when you can easily get the db server to simply return the
appropriate record and work with it from there.

In theory, db servers are optimized for this kind of work.

Much warmth,

Murray
http://www.planetthoughtful.org
Building a thoughtful planet,
One quirky comment at a time.

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

Reply via email to