'Call to a member function result() on boolean in CodeIgniter3, ms sql server

im createing a website with my friend using CodeIgniter3 with ms sql server. When i try to run the app on my local its work, but my friend not working and got this message on model.

Call to a member function result() on boolean in

and the cause of the error is this code

return $query->result();

i have the same sqlsrv, php version (8.1) and odbc driver (odbc17) version with my friend but different Microsoft Sql Server, so i wanna ask is the version of the ms sql server is the problem or the db connection of my friend is wrong?? also how to solve that error?? i already tried anything like this->db->query("...") or etc but still not working on my friend's local..

also here is the code of database.php

$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
    'dsn'   => '',
    'hostname' => '127.0.0.1',
    'username' => 'root',
    'password' => '1234567890', 
    'database' => 'project_event', 
    'dbdriver' => 'sqlsrv', 
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' =>  (ENVIRONMENT !== 'production'),
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source