[eluser]Unknown[/eluser]
hi, i'm new here and i have a proble using active record for a search function using like
my code:
Code:
function get_main_search()
{
$keyword = $this->uri->segment(3, 0);
$this->db->like('itemName', $keyword);
$this->db->where('instock <>', '9');
$this->db->or_like('label', $keyword);
$this->db->where('instock <>', '9');
$this->db->or_like('labelname', $keyword);
$this->db->where('instock <>', '9');
$this->db->or_like('title', $keyword);
$this->db->where('instock <>', '9');
$this->db->orderby('itemName, title');
$query = $this->db->get('items');
return $query;
}
it seems to ignore the instock <> 9 part of the query. this works when use a normal sql query instead of active class. am i missing something?
thanks for your time
diep