Re: Making several variables into 1 variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 7/28/09 8:35 AM, "Ashley Sheridan" <ash@xxxxxxxxxxxxxxxxxxxx> wrote:

$pastDays = strtotime("-30 days");
$date = date("d/m/y", $pastDays);

Well I tried and got no results from my query and I know there results with date ranges in the last 30 days, I basically need to count backward from now() 30 days I thought strtotime() would work well..but the fields in the db are varchar not date fields they are all formatted the same though 00/00/00:

  $sql = "SELECT DISTINCT restaurants.ID, name, address, inDate FROM restaurants, inspections WHERE restaurants.name != '' AND inspections.inDate <= $date GROUP BY restaurants.ID ORDER BY 'name' ";

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux