[eluser]Philipp Datz[/eluser]
ar gives me no errors, instead i get both for the search results: published und un-published news in the search result. my statements are:
$this->db->like('title', $query);
$this->db->or_like('body', $query);
$this->db->where('published', 1);
$results_news = $this->db->get('news');
i tried also the following:
$this->db->where('published', 1);
$this->db->like('title', $query);
$this->db->or_like('body', $query);
$results_news = $this->db->get('news');
but the result is the same.
i think the problem is that the where clause does not work as a filter but as a addition/alternative
philipp
edit: i also tried the or_where-statement, with the same result.