Jump to content

select * where date is between


flemingmike

Recommended Posts

i think this is you need to get

// today date.
$today = date('Y-m-d');

//next tuesday date.
$next = date('Y-m-d', strtotime("tuesday"));

//query to get the records between today & next tuesday.
$sql = "SELECT * FROM `DB_table` WHERE date BETWEEN '$today' AND '$next'";

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.