このコードを使用してユーザーを確認します。
public function verify_user($username, $password)
{
    $q = $this->db->where('username', $username)
        ->where('password', md5($password))
        ->limit(1)
        ->get('users');
    if ($q->num_rows() === 1) {
        echo '<pre>';
        print_r($q->row());
        echo '</pre>';
    } else {
        echo 'EMPTY';
    }
}
ただし、1 の場合は何も表示されません。
Array
(
)
このコードを使用して odbc num_rows = -1 の問題を修正すると表示されます: CODEIGNITER Issue on line 40 until 67
編集 =============================
私が実現したいのはこれです
stdClass Object
(
    [id_user] => 2
    [username] => 114080077
    [password] => 0d5ccab9e7f4ae3fe040f143046e386c
)
私が変更するコードは次のとおりです: 前 (STABLE VERSION) :
/**
 * Number of rows in the result set
 *
 * @access  public
 * @return  integer
 */
function num_rows()
{
    return @odbc_num_rows($this->result_id);
}
(問題の修正) 後:
/**
 * Number of rows in the result set
 *
 * @return  int
 */
public function num_rows()
{
    if (is_int($this->num_rows))
    {
        return $this->num_rows;
    }
    elseif (($this->num_rows = @odbc_num_rows($this->result_id)) !== -1)
    {
        return $this->num_rows;
    }
    // Work-around for ODBC subdrivers that don't support num_rows()
    if (count($this->result_array) > 0)
    {
        return $this->num_rows = count($this->result_array);
    }
    elseif (count($this->result_object) > 0)
    {
        return $this->num_rows = count($this->result_object);
    }
    return $this->num_rows = count($this->result_array());
}