SELECT SUM(money) as moneyFROM table WHERE DATE(FROM_UNIXTIME(ADDTIME)) = CURDATE()-1
修正版
SELECT SUM(money) as money FROM table WHERE DATE(FROM_UNIXTIME(success_time)) = DATE_SUB(CURDATE(),INTERVAL 1 DAY)
.....
修正版
SELECT SUM(money) as money FROM table WHERE DATE(FROM_UNIXTIME(success_time)) = DATE_SUB(CURDATE(),INTERVAL 1 DAY)
转载请注明:谷谷点程序 » mysql查出昨天的数据