I want to count the number of rows that exist AFTER 17 days older than todays date (older than 17 days). The code that I have put in below shows how I am attempting to do this now. I have no errors in the code, however the query is just telling me how many cases exist between ex: 2007-01-30 AND 2007-02-16. I want to know how many rows exist after ex: 2007-01-30
Code: Select all
<?php
$start_date1 = strtotime("-17 day");
$start_date1 = date("Y-m-d", $start_date1);
$end_date = date("Y-m-d");
echo mysql_num_rows(mysql_query("SELECT * FROM cases WHERE location_territory='Bronx' AND assigned='false' AND date_ordered BETWEEN '$start_date1' AND '$end_date'"));
?>