>From what I know, your solution would only work if you have exactly three
records to find (there might be 1 or 100), only if the latest records fall
within the last three days. I think Vittorio said he didn't know ahead of
time what most recent date would be.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


> -----Original Message-----
> From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 14, 2006 12:00 PM
> To: mysql@lists.mysql.com
> Subject: Re: Max date in recordset
>
> select * from table where InsertDate = date_sub(now,interval
> 1 day) limit 3;
>
> Not tested, but i think it will work fine.
>
> ""Vittorio Zuccalà"" <[EMAIL PROTECTED]>
> escreveu na
> mensagem news:[EMAIL PROTECTED]
> > Hello,
> > i've a table with a lot of field and in particular:
> > "InsertDate","Box","Prt"
> > Example:
> > InsertDate, Box, PRT
> > 2006-11-01, BXT, 34
> > 2006-11-01, TTS, 33
> > 2006-11-01, RRT, 55
> > 2006-11-02, BXT, 22
> > 2006-11-02, TTS, 99
> > 2006-11-02, SAR, 75
> >
> >
> > I'd like to find all record inserted in the last day...
> > In this example the last three records...
> > I do not know which is the last day before
> >
> > Any suggestions?
> >
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to