统计表中字段数据总值:
$startInfo = $objOrderInfo->field("COUNT(*) number,SUM(order_amount) account")->where("ctime >=‘$startPeriod[startTime]‘ AND ctime <=‘$startPeriod[endTime]‘ AND extension_code =‘integral‘")->find();
原文地址:http://www.cnblogs.com/tangyangping/p/4010750.html