public function Pesquisa($param){ $sql = $this->select() ->setIntegrityCheck(false) ->from(array("n" => $this->_name)) ->joinLeft(array("i" => "table_2"), "i.vinculo = n.id", array("imagem")) ->where("n.titulo REGEXP '$busca' OR n.texto REGEXP '$busca' OR n.keywords REGEXP '$busca' ") ->where(" ativa = 1 ") ->order('data DESC'); return $this->fetchAll($sql)->toArray(); }