application/models/admin_api/User_model.php
/* make user as test or normal users*/
make user as test or normal users
make user as test or normal users
public function testMultipleUsers($data)
    {
        $search_ids = array();
        $userId = implode(",",$data);
        $query = "SELECT userId,testFlag from users where userId IN($userId)";        
        $record = $this->db->query($query);
        if($record->num_rows()>0){
            $result = "UPDATE users SET testFlag = 'TestUser' WHERE userId IN($userId)";
            $record_update = $this->db->query($result);
            if($this->db->affected_rows()>0){
                $updated = true;
            }else{
                $updated = false;
            }
            return $updated;
        }else{
            return false;
        }
    }
public function testMultipleUsers ( $ data ) { $ search_ids = array ( ) ; $ userId = implode ( " , " , $ data ) ; $ query = " SELECT userId,testFlag from users where userId IN( $ userId ) " ; $ record = $ this -> db -> query ( $ query ) ; if ( $ record -> num_rows ( ) > 0 ) { $ result = " UPDATE users SET testFlag = 'TestUser' WHERE userId IN( $ userId ) " ; $ record_update = $ this -> db -> query ( $ result ) ; if ( $ this -> db -> affected_rows ( ) > 0 ) { $ updated = true ; } else { $ updated = false ; } return $ updated ; } else { return false ; } }
make user as test or normal users
make user as test or normal users