コード例 #1
0
 function delete()
 {
     $ids = explode(',', $_POST['items']);
     foreach ($ids as $i => $id) {
         if ($id) {
             $tean = new team_model($id);
             $tean->delete();
         }
     }
 }
コード例 #2
0
 function get($name = '', $limit = 99)
 {
     $team_members = array();
     $this->db->select('*', FALSE);
     // the FALSE removes backticks to allow the order_by substring expression
     $this->db->where('status', 'publish');
     $this->db->from(self::table_name);
     $this->db->order_by("fs_team.order, SUBSTRING(name, LOCATE(' ', name)+1)");
     if ($name) {
         $this->db->where('name', $name);
     }
     $this->db->limit($limit);
     $query = $this->db->get();
     foreach ($query->result() as $c) {
         $team_member = new team_model();
         $team_member->_load_from_query($c);
         $team_members[$c->id] = $team_member;
     }
     return $team_members;
 }