Welcome Guest, Not a member yet? Register   Sign In
use active records in library
#4

(This post was last modified: 10-22-2017, 06:22 AM by Valerekk.)

PHP Code:
public function userExists($id){
 
       $query $ci->db->get_where('users', array('id' => $id));
 
       $number $query->num_rows();
 
       if($number 0)
 
           return true;
 
       else
            return false
;
 
   

Thanks guys.. the only correction i've done is row number 2
PHP Code:
$query $ci->db->get_where('users', array('id' => $id)); 
i corrected it as
PHP Code:
$query $this->ci->db->get_where('users', array('id' => $id)); 
Now it works. Rep+ for enlivenapp and InsiteFx
Reply


Messages In This Thread
use active records in library - by Valerekk - 10-21-2017, 07:10 PM
RE: use active records in library - by enlivenapp - 10-21-2017, 07:41 PM
RE: use active records in library - by Valerekk - 10-22-2017, 06:22 AM
RE: use active records in library - by InsiteFX - 10-22-2017, 03:29 AM
RE: use active records in library - by InsiteFX - 10-23-2017, 08:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB