Here's my table:date disabled2012-01-01 00:04:00 12012-01-01 00:03:00 02012-01-01 00:02:00 02012-01-01 00:01:00 1
I can retrieve the oldest record withSELECT * FROM table WHERE date = (SELECT min(date) FROM table)
I now want to retrieve the oldest record where disabled = 0SELECT * FROM table WHERE date = (SELECT min(date) FROM table) AND disabled = 0
This returns nothing. Any ideas? It should returndate disabled2012-01-01 00:02:00 0
Many thanks.