Am I not seeing something obvious here, can’t seem to get this to work…
if (($_GET['date']=='today'))
{
$today = date('Y-m-d', strtotime('today'));
$query = "SELECT * FROM contacts WHERE (contacttype = 'Buyer' OR "
. "contacttype = 'Seller' OR contacttype = 'Buyer / Seller' OR "
. "contacttype = 'Investor') AND date = '$today' ORDER BY date DESC";
}
Thanks!
You don’t even need to use PHP to tell MySQL what today is, it already knows!
will work, assuming all of the other conditions in your WHERE clause are correct. See MySQL’s date() and now() reference.