Why don't you :
select timestampfield from mytable order timestampfield decs limit 1

Jay Lawrence wrote:
> 
> Atle, your suggestion is for the last time a record was updated. I am
> interested in the entire table.
> 
> The closest that I have seen thus far is:
>     SHOW TABLE STATUS
> The Update_time field is most likely what I am after.
> 
> However I was hoping to do something more like
> 
>     select Update_time from table(x) status
> 
> Giving me one value back - the Update_time for table "x" of current
> database.
> 
> Perhaps this is a candidate for function extension?
> 
> Jay
> 
> > You might be able to use this, depending on your needs:
> >
> > from http://www.mysql.com/doc/D/A/DATETIME.html
> >
> > [snip]
> >  Automatic updating of the first TIMESTAMP column occurs under any of the
> > following conditions:
> > The column is not specified explicitly in an INSERT or LOAD DATA INFILE
> > statement.
> > The column is not specified explicitly in an UPDATE statement and some
> > other column changes value. (Note that an UPDATE that sets a column to the
> > value it already has will not cause the TIMESTAMP column to be updated,
> > because if you set a column to its current value, MySQL ignores the update
> > for efficiency.)
> > You explicitly set the TIMESTAMP column to NULL.
> > [/snip]
> >
> >
> > .. Atle
> >
> > On Wed, 14 Feb 2001, Jay Lawrence wrote:
> >
> > > Hey all,
> > >
> > > Is there a way to quickly obtain the last time a table was
> updated/touched?
> > >
> > > In my app I am caching queries so long as the table data has not
> changed. I'd like a quick check to see if a table has changed since the
> query was first executed. My perusal of documentation plus a few searches on
> mailing lists has not uncovered this matter - but I could have missed it.
> > >
> > > TIA,
> > > Jay
> > >
> >
> >
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to