thinkphp mysql 按每天做分组
$sql = “select FROM_UNIXTIME(`addtime`,’%Y-%m-%d’) as adddate,count(id) as num,sum(price*sallotnum) as zprice,uid,addtime from `vegetorderdivide` where status <3 and uid=”.$user_name[‘id’].” and “.$str.” group by adddate”;
$glist = M()->query($sql);