//求某字段的总和
$res2=mysql_query("select sum(price) as sumyy from services whereDATE_FORMAT(laifangtime, '%Y-%m-%d') >= '$starttime' andDATE_FORMAT(laifangtime, '%Y-%m-%d') <= '$endtime' ".$r1."".$r2." ".$r3." ".$r4." ".$r5." ".$r6." ".$r7." ".$r8." ".$r9."".$r10." ".$r11." ".$r12." ".$r13." ".$r14." ".$r15." ".$r16."".$r17." ".$r18." ".$r19." ".$r20." ".$r21." ".$r22."");
$r2=mysql_fetch_array($res2);
- $ts_rs=DB::get_one("SELECT sum(totaltime) as tsecond FROM ".$_M['table'['live_user_data_statistics_time']." WHERE cc_id='$id4' and uid='$id'");
- $total_second=$ts_rs['tsecond'];//单位为秒