You can also do this right within MySQL without needing to create a
variable.  This should work:
$sql = "SELECT DISTINCT restaurants.ID, name, address, inDate FROM
restaurants, inspections WHERE restaurants.name != '' AND
datediff(curdate(),inspections.inDate)>=30 GROUP BY restaurants.ID
ORDER BY 'name' ";

Take care,

Ok I have to do the same thing again but with even more variables posted from a 
I have a form where a user can choose a date range currently the form returns 6 
variables (bmonth, bday, byear, emonth, eday, eyear) now I have to take those 
and get them all formatted together (well the bmonth, bday, byear together) in 
the mm/dd/yy format

Wait can't I.....
$month = $date(m, $bmonth) like that but then I still end up with 3

$month, $day, $year.... Does that work like that $date(m/d/y, $month, $day, 

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

Reply via email to