统计消费记录?应该怎么写呢?
$rt = \Phpcmf\Service::M()->db->table("member_paylog")->select('sum(value) as xiaofei')->where('value <', '0')->where('uid', $member.id)->get();
if ($rt) {
$rows = $rt->getResultArray();
echo $rows['xiaofei'];
}看了CI4手册,改成这样了,但是输出没有内容
另外如果要加上时间限制,本月?要怎么写?