That is my select function:
public function search($for) {
$q = $this->select()->from($this->_name, array('id', 'title', 'content'))
->where('title LIKE ?', "%$for%")
->orWhere('content LIKE ?', "%$for%")
->orWhere('keywords LIKE ?', "%$for%")
->where('is_visible = ?', 0)
->where('category = ?', 7);
return $this->fetchAll($q);
}
But why if is_visible = 1 or category is different from 7 select and other rows?
My suspicion is that the AND/OR precedence is not being interpreted correctly. Try this: