PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$usabilityQuery1 = "SELECT avg(usability) as avgUsability1 FROM usabilityresults WHERE dateSubmitted between DATE_SUB(now(), interval 1 DAY) and now()";
$usabilityresult1=mysql_query($usabilityQuery1);
$usabilityRow1 = mysql_fetch_array($usabilityresult1);
$usabilityQuery2 = "SELECT avg(usability) as avgUsability2 FROM usabilityresults WHERE dateSubmitted between DATE_SUB(now(), interval 2 DAY) and now()";
$usabilityresult2=mysql_query($usabilityQuery2);
$usabilityRow2 = mysql_fetch_array($usabilityresult2);
what i would like to know is if i can have named (specific) dates. this would mean that i can have the results for any given month or months
i have been looking at this page: http://dev.mysql.com/doc/refman/5.1/en/ ... n_datediff but i still am not able to find a solution to my predicament which is to return results between 2 given dates rather than using the INTERVAL parameter. is there a way of doing this?