z
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
age-
> From: Vittorio Zuccalà [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 14, 2006 11:44 AM
> To: mysql@lists.mysql.com
> Subject: Max date in recordset
>
> Hello,
> i've a table with a lot of field and in particular:
> "InsertDate","Box","
If you're looking for the records from the last full day contained in
the data, not the past 24 hours according to the clock, then this
ought to work:
select * from table
where InsertDate >= date_sub( (select max(InsertDate from table),interval 1 day)
order by InserDate desc
Dan
On 11/14/06, V
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"
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 thi