コード例 #1
0
ファイル: user_model.php プロジェクト: ram-1501/rs
 function listing()
 {
     $this->_fields = " *,IF(is_blocked='1','Inactive','Active') as status";
     //from
     $this->db->from($this->_table);
     //joins
     //where
     foreach ($this->criteria as $key => $value) {
         if (!is_array($value) && strcmp($value, '') === 0) {
             continue;
         }
         switch ($key) {
             case 'user_name':
                 $this->db->like($key, $value);
                 break;
         }
     }
     return parent::listing();
 }
コード例 #2
0
ファイル: role_model.php プロジェクト: ram-1501/rs
 function listing()
 {
     $this->_fields = " *";
     //from
     $this->db->from($this->_table);
     //joins
     //where
     foreach ($this->criteria as $key => $value) {
         if (!is_array($value) && strcmp($value, '') === 0) {
             continue;
         }
         switch ($key) {
             case 'name':
                 $this->db->like($key, $value);
                 break;
         }
     }
     return parent::listing();
 }