Re: DESC order results

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

 



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...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
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