Welcome Guest, Not a member yet? Register   Sign In
Authenticating a User through Login
#2

[eluser]dalebotha[/eluser]
Hi

I'm a relative new comer to CI and Php in general but my database queries have gone something like this:
Code:
function get_password($username) {
    
    $this->db->where('username', $username);

    $validate = $this->db->get('users', 1); // 'users' - table, 1 - limit

    if ( $validate->num_rows() == 1 )
    {
     return $validate->row_array();
    }
    else
    {
     return false;
    }

}

I'm too unfamiliar with CI check the rest of your code and whether your database interaction is syntactically correct but this is how I've been doing my db stuff.

I hope this helps. Smile

Dale


Messages In This Thread
Authenticating a User through Login - by El Forum - 10-19-2008, 05:24 PM
Authenticating a User through Login - by El Forum - 10-20-2008, 12:51 AM
Authenticating a User through Login - by El Forum - 10-20-2008, 01:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB