RE: getting a number range from user input.. (weight)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux