Category Archive: MySQL

MySQL: Getting records near a date

I recently had to write a query in PHP that returned a ranking per a specified date and time. The rankings get saved every hour, but not precisely on the hour. The user does not know when the rankings were saved precisely but wants to know what the ranking was per “yyyy-mm-dd hh:mm” or as …

Continue reading »