On 4/03/2006 5:36 PM, Anthony Ettinger wrote:
Yep, that's one good reason among many for using unique ids.
Thinking a
little about the OP's question, I could understand row order being
relevant in certain situations where you wanted to display something
like, "You were the 432nd person to register at our site!", etc.
I'd do this with a timestamp, and then sorting by date and doing a
count() on the results. But then again that's just me. I remember the
days where i'd clear a database after testing to keep the
auto_increment inline, but eventually, you will get out of sync on
that, so it's not a reliable way of keeping a numerical sequence.
Right, or you could just as easily do the same sort and WHERE clause by
your unique id, but even just doing a count, you're interested in the
fact that the record is at position <whatever> in that recordset, so
'row order' is relevant and, in that context, meaningful.
Much warmth,
planetthoughtful
---
"Lost in thought"
http://www.planetthoughtful.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php