关注公众号:青山有路

thinkphp mysql 按每天做分组

mysql admin 7年前 (2018-01-21) 1495次浏览 已收录 0个评论 扫描二维码

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);


版权所有丨如未注明 , 均为原创 , 转载请注明thinkphp mysql 按每天做分组
喜欢 (0)

Warning: Use of undefined constant PRC - assumed 'PRC' (this will throw an Error in a future version of PHP) in /www/wwwroot/gaowenjie.cc/wp-content/themes/Git-alpha/comments.php on line 17
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到