if(count($this->table_access_restriction) > 0) foreach($this->table_access_restriction as $field=>$value) $this->db->where($field,$value);