I have a table with a DATE field and i want to gram the row that has tha max date field
something like that:
SELECT *
FROM table
WHERE date=MAX(date)
Moderator: General Moderators
Code: Select all
SELECT * FROM table SORT date DESC LIMIT 1 // recent dateCode: Select all
SELECT * FROM table SORT date ASC LIMIT 1 // earlier dateCode: Select all
SELECT * FROM table WHERE date = date // earlier date
then do a mysql_num_rows()Code: Select all
select * from table having max(to_days(date))=to_days(date)