|
发表于 2009-5-20 15:10:33
|
显示全部楼层
$this->db->select('a.long_id,a.name,a.description,a.configuration,'
.' b.name as catetory,c.name as period,d.name as status,'
.' e.name as type,a.startdate,a.enddate');
$this->db->from('u_projects as a');
$this->db->join('d_project_category as b', 'a.category_id = b.id');
$this->db->join('d_project_period as c', 'a.period_id = c.id');
$this->db->join('d_project_status as d', 'a.status_id = d.id');
$this->db->join('d_project_type as e', 'a.type_id = e.id');
$this->db->order_by('a.name');
$this->db->limit($num);
return $this->db->get(); |
|