Richard Lynch schreef:
On Sun, January 13, 2008 12:54 pm, Danny Brow wrote:
Just wondering if anyone could tell me how reliable the DESC order
option is going to be when I am parsing thousands of records where
they
are multiple ChartNo's for the same clientNo. Or is there a better way
to grab the most recent ChartNo.

This is not actually a PHP question...

Assuming ChartNo is some kind of autoincrement field, it HAPPENS to be
100% reliable in current MySQL implementation.

Unfortunately, it's also 100% the *WRONG* way to go about this, as the
MySQL dev team could change their implementation of autoincrement at
any time, for any reason, and you'd be up the creek without a paddle
[*].

If you want the most RECENT chart in time, you should time-stamp every
chart with a datetime field, and use that in DESC in your query.

You should take this discussion to the MySQL list if you wish to
understand why.

[*] It has just occured to me that being UP the creek with no paddle
isn't much of a big deal, as you can just drift back down.  Being DOWN
the creek with no paddle, however, would be more problematic.  English
is such a curious language...

I think it assumes that you want to be down (where shit creek meets fresh water)
and, although the flow will take you there, shit flows so slowly that your
stuck with a decision of straving to death waiting for the drift or using you
hands as paddles ... but indeed curiouser and curiouser it is :)



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

Reply via email to