Welcome Guest, Not a member yet? Register   Sign In
Newbie at Codeigniter with Login Model
#1

[eluser]Unknown[/eluser]
Hi , every one , well , this is first time i use a framework , Friends recommanded me CodeIgniter , that i found very usefull !
well i have problem with the mysql_nu_rows i didn't find an equivalent in Db librairy
please help me solving this problem , i need to uses it here
Code:
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
class login_model extends CI_Model{
    public function verify_login($name,$pass){
      $query= $this->db->get_where('ci_users', array('name' => $name,
                                              'pass' =>$pass
                                              ));
       if($this->db->count_all()>0)
         return 1;
         else{
             return 0;
         }
     }  
}
?>
please tell me if i have anything wrong !
i have always 0 as value of return wich means count_all is null
of course with correct login name and pass


Messages In This Thread
Newbie at Codeigniter with Login Model - by El Forum - 07-25-2011, 07:21 AM
Newbie at Codeigniter with Login Model - by El Forum - 07-25-2011, 08:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB