Jump to content

Query


sandy1028

Recommended Posts

assuming you store a time stamp then...

 

$qry = "SELECT * FROM `tablename` WHERE `timestamp` > " . time() - (3600 * 24);

$qry = mysql_query($qry);

 

if you actually store a date...

 

$qry = "SELECT * FROM `tablename` WHERE `date` > DATESUB(NOW(), INTERVAL 1 DAY)";

$qry = mysql_query($qry);

Link to comment
https://forums.phpfreaks.com/topic/69005-query/#findComment-346852
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.