Hi folks,
I need to change existing SQL queries which used MATCH AGAINST to one that uses LIKE syntax. I tried to change them myself but I don't think it's working. First line is the original line and second line(commented out) is what I tried.
Please someone help me with this.
Thanks
Kimmie2k
$this->dao->where(sprintf("MATCH(d.s_title, d.s_description) AGAINST('%s' IN BOOLEAN MODE)", $this->sPattern) );
//$this->dao->where(sprintf("d.s_title LIKE '%%%s%%' OR d.s_description LIKE '%%%s%%'", $this->sPattern, $this->sPattern) );
} else if(preg_match('/MATCH(d.s_title, d.s_description) AGAINST(\'([\s\p{L}\p{N}])\' IN BOOLEAN MODE)/u', $condition, $matches) ) { // OJO
//} else if(preg_match('/d.s_title\sLIKE\s\'%([\s\p{L}\p{N}])%\' OR .s_description\sLIKE\s\'%([\s\p{L}\p{N}]*)%\'/u', $condition, $matches) ) { // OJO