Skip to content

Right and secure way to do quicksearch with doctrine

icansurvive edited this page May 7, 2015 · 1 revision

Little example how to do quicksearch with doctrine

protected function initFilters($query)
    {
        if ($value = $this->getParamAdapter()->getQuickSearch()) {
            $query->where("q.question LIKE :search ")
                  ->setParameter('search', '%' . $value . '%');
        }
    }
Clone this wiki locally