Jump to content

select by date


adzie

Recommended Posts

It all depends on how you have your date field set up in the database, but if you have it set up using one of mysql dates, you could use one of these:

 

 

$select = mysql_query("SELECT * FROM `table` WHERE `date` = CURDATE()");
$select = mysql_query("SELECT * FROM `table` WHERE `date` = NOW()");
$select = mysql_query("SELECT * FROM `table` WHERE `date` = DATE_FORMAT(date,format)");

Link to comment
https://forums.phpfreaks.com/topic/154884-select-by-date/#findComment-814651
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.