I have to perform the edit/update operation through the same page from which I am performing the insert operation. I get error undefined $select
.
This is my method :
function editCategory($catId,$datavalue)
{
$data=array(
'CategoryName' => $datavalue['CategoryName'],
'Status' => $datavalue['Status']
);
$this->db->update('tblcategory');
$this->db->set($data);
$this->db->where('id',$catId)
$this->db->select('*');
$this->db->from('tblcategory');
$this->db->where('id',$catId);
$query=$this->db->get()->row();
//$result=$query->row_array();
if($query)
{
return $query;
}
else
{
return false;
}
}