I want to get rows in the database in which:
"l_area" is the table column
"in consignment" is the table
and the restriction "l_area" is equal to the stored value in "area" variable.
My code is shown below. It is only outputting all the selected items even if l_area is not equal to area.
function get_all()
{
$area = $this->session->userdata('area');
$this->db->select('l_area','d_area','description','dom','tom'); // the select statement
$this->db->where('l_area' == $area);
$q = $this->db->get('consignment'); // the table
}