• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database library Bug??

#1
[eluser]jaswinder_rana[/eluser]
I am using DX Auth library for authentication.

I tried following code
Code:
$user = '';
$obj = $this->users_model->get_user_by_username($user)->result();
print_r($obj[0];


It returns ALL users. It shouldn't return any user.

I enabled profiler and it's running following query
Code:
SELECT *
FROM (`users`)
WHERE `username` = 0

I am guessing that if it's empty, it changes it to 0.

Is this how it's supposed to work?

Thanks


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.