Erik Liljencrantz wrote:
> Maybe I'm missing something, but;
> "order by fieldname desc limit 1" usually
> gets me the record where the field has the largest value (or
> smallest without desc).
> In this case:
> select UserName, Created
> from MyTable
> where UserName = 'MyUserName'
> order by Created desc limit 1
> To simple to work? mySQL knows how to optimize this type of query.
Ah! [Slaps hand to forehead loudly!]
Thanks, that ought to do it...
If it ain't opinionated, it ain't Rich Teer.