Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8249951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:43:04+00:00 2026-06-07T23:43:04+00:00

I use this code to verify the user. public function verify_user($username, $password) { $q

  • 0

I use this code to verify the user.

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';
    }
}

But, when it equals 1, it display nothing.

Array
(
)

It appear when I use this code to fix odbc num_rows = -1 issue: CODEIGNITER Issue on line 40 until 67

EDIT =============================

What I want to achive is this

stdClass Object
(
    [id_user] => 2
    [username] => 114080077
    [password] => 0d5ccab9e7f4ae3fe040f143046e386c
)

Code that I modify is:
Before (STABLE VERSION):

/**
 * Number of rows in the result set
 *
 * @access  public
 * @return  integer
 */
function num_rows()
{
    return @odbc_num_rows($this->result_id);
}

After (ISSUE FIX):

/**
 * 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());
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T23:43:06+00:00Added an answer on June 7, 2026 at 11:43 pm

    You can’t just use the development version of CI_DB_odbc_result and keep the rest of the stuff from the 2.1 version tree. If you don’t want to replace all of them, what you need to get from the repository are the following files:

    system/database/DB_driver.php
    system/database/DB_result.php
    system/database/drivers/odbc/odbc_driver.php
    system/database/drivers/odbc/odbc_result.php
    

    (assuming that you only use ODBC)

    There still could be an issue with the ODBC result class and I’ll look into that, but considering that your question refers to a yet unreleased version of CodeIgniter – it would be better that you post any problem reports to either the CodeIgniter forums or the GitHub repository.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this code to select password field from the sql server 2012 db,
I use this code : MethodInvoker TileLoadCompleteMethodInvoker = delegate() { CleanStatusLabelTimer.Enabled = true; MemoryTextBox.Text
i use this code in my app. just found is not correct when compare
I use this code to connect to SQL Server 2012, but it does not
I use this code , to log $_SERVER['REMOTE_ADDR']; to my small db my issue
I use this code to update data in database table. Can reuse same code
I use this code: http://blogswizards.com/plugin-development/sliding-boxes-and-captions-with-jquery On a simple gallery site I am building. Specifically
I use this code to process a date string coming in from a json
I use this code which is taken from MVC futures and attach the Attribute
I use this code to generate a random number. Random R = new Random(0);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.