• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Query Builder

#1
I have studying a code below, I am curious why there is no select statement in the code? And it works perfectly fine. Thank you

$this->db->from('Users');
$where_array = array( 'Username' => $username,
                                  'Password' => $password,
                                 'Active' => 1);
  $this->db->where($where_array);
  $query = $this->db->get();
Reply

#2
When a query is executed through the Query Builder that doesn't have any select statement specified, it assumes select *.
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply

#3
(08-19-2018, 09:21 PM)kilishan Wrote: When a query is executed through the Query Builder that doesn't have any select statement specified, it assumes select *.

Thanks I just want to clarify it, because I can't find it in the documentation.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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