in reply to Learning DBI

Here's a question that would help me out. Is it possible to select a row where some field is the largest in the table?

For example, say I want to fetch the row with the most recent date (format 20021108).

Replies are listed 'Best First'.
Re: Re: Learning DBI
by gjb (Vicar) on Nov 08, 2002 at 09:43 UTC
    SELECT MAX(article) AS article FROM shop
    
    +---------+
    | article |
    +---------+
    |       4 |
    +---------+
    
    Taken from the MySQL docs.

    Hope this helps, -gjb-

      that's cool, but how dow I get it to return the whole row?
      UPDATE:Never mind, I figured it out.

      Thanks for the help everyone, I think I'm getting a handle on this now.