problem in where clause with active record - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: problem in where clause with active record (/showthread.php?tid=37817) |
problem in where clause with active record - El Forum - 01-21-2011 [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 problem in where clause with active record - El Forum - 01-21-2011 [eluser]InsiteFX[/eluser] Delete the [size=3] InsiteFX problem in where clause with active record - El Forum - 01-22-2011 [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 |