|
因为我要做排行榜统计
SQL语句是:select *,sum(hits) from ranking where week(date)=week(now()) group by contentid order by sum(hits) desc
$this->db->select_sum('hits'); 可以设定 sum(hits)
PHP复制代码 where week (date)=week (now ()) 复制代码
这一部分能用$this->db->where()写吗?来这里请教因为我没试成功
|
|