Welcome Guest, Not a member yet? Register   Sign In
problem in where clause with active record
#1

[eluser]Unknown[/eluser]
i am getting this error


A PHP Error was encountered

Severity: Notice

Message: Undefined index: password

Filename: controllers/account.php

Line Number: 91

if i use this line of code below in a function...

[size=3]$this->db->where('username', $this->_username);


without the where part everything works but when i put this line then this problem happens
#2

[eluser]InsiteFX[/eluser]
Delete the [size=3]

InsiteFX
#3

[eluser]Unknown[/eluser]
i tried to use a callback function i was suppose to get a match of password from the database if exists and suppose to get a error message if it doesn't but i am getting the mentioned error when i am using the where clause . i am giving you the function code below

function password_check() {
$temp=$this->_username;

$this->db->where('username', $this->_username);
$query = $this->db->get('users');
$result = $query->row_array();
if($result['password'] == $this->_password)
{
return TRUE;
}
if($query->num_rows() == 0) {
$this->form_validation-> set_message('password_check', 'There was an error!');
return FALSE;
}
}//Password Check




Theme © iAndrew 2016 - Forum software by © MyBB