[SOLVED]DATETIME conditional expressions.
Posted: Wed Jun 18, 2008 9:45 pm
I have a table with a DATETIME field. I would like to select all fields in this table that is larger then the current time minus x seconds/minutes.
For example:
This will allow me to select all records that are only moments new.
Thank you for taking the time to read this post.
For example:
Code: Select all
$sql = "SELECT * FROM `table` WHERE `date` > (CURRENT_TIME - X_TIME)"; //Where X_TIME is a few seconds or minutes.
Thank you for taking the time to read this post.