Re: Last and Last-1

2006-11-02 Thread suomi
select idTable ... FROM FaxServer ORDER by DateFaxInsert DESC LIMIT 2 suomi Vittorio ZuccalĂ  wrote: Hi, i've a table in a mysql database. It has a lot of field and three of them are: * A counter: IDTable * A date: DateFaxInsert * A Number: NumberFaxInsert I want to obtain the last and the last

Last and Last-1

2006-11-02 Thread Vittorio ZuccalĂ 
Hi, i've a table in a mysql database. It has a lot of field and three of them are: * A counter: IDTable * A date: DateFaxInsert * A Number: NumberFaxInsert I want to obtain the last and the last - 1 IDTable. If i write: SELECT MAX(IDTable) AS IDMax, DateFaxInsert, NumberFaxInsert FROM FaxServer