I have this list of time taken from mysql database:
2011-07-22 10:12:53
2011-07-22 10:17:53
2011-07-22 10:19:42
2011-07-22 10:29:31
Right now i want to get the closest date time from the bold date time. Only the date time after the bold one will be valid, and it must be the closest. So the desired result is 2011-07-22 10:19:42
How to solve this using php or mysql?
Thanks.