$date = date('Y-m-d 00:00:00');
$dates = date('Y-m-d H:i:s');
$sql = "select sum(money) num from money where
createdate>='".$date."' and createdate<='".$dates."' and
money>0 and ordernumber <>'' " ;
转载于:https://my.oschina.net/meng527/blog/531961