Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 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();
 }