Doktrini karşı maç ile ilgili sorun

0 Cevap php

I found that if I use MATCH AGAINST in Doctrine with WHERE syntax does not replace the parameters passed. For example if I run the following code $

q = Doctrine_Query::create()
    ->select('*')
    ->from('TourismUnit tu')
    ->where('FALSE');
if ($keywords) {
    $keywords_array = $this->parse_keywords($keywords);
    for ($i = 0; $i < sizeof($keywords_array); $i++)
        $q->orWhere("MATCH (name, description) AGAINST ('?*' IN BOOLEAN MODE)", $keywords_array[$i]);
}

does not find any results. And if they use the string concatenation seems to work.

 $q->orWhere("MATCH (name, description) AGAINST ('".$keywords_array[$i]."*' IN BOOLEAN MODE)");

Ben Doctrine 1.2.2 kullanabilirsiniz.

Does anyone know why not replace the parameters before executing the sql expression? Thanks.

0 Cevap