Jaxel
Well-known member
Lets look at this code:
notice the array of $keywords at the bottom... Something like that pisses me off...
Code:
public function getSearchResults($keywords)
{
$media = $this->_getDb()->fetchAll("
SELECT *,
MATCH(media_title) AGAINST(?) AS score_title,
MATCH(media_description) AGAINST(?) AS score_description,
MATCH(media_custom1) AGAINST(?) AS score_custom1,
MATCH(media_custom2) AGAINST(?) AS score_custom2,
MATCH(media_custom3) AGAINST(?) AS score_custom3,
MATCH(media_custom4) AGAINST(?) AS score_custom4,
MATCH(media_custom5) AGAINST(?) AS score_custom5
FROM EWRmedio_search
WHERE MATCH(media_title) AGAINST(?)
OR MATCH(media_description) AGAINST(?)
OR MATCH(media_custom1) AGAINST(?)
OR MATCH(media_custom2) AGAINST(?)
OR MATCH(media_custom3) AGAINST(?)
OR MATCH(media_custom4) AGAINST(?)
OR MATCH(media_custom5) AGAINST(?)
", array($keywords, $keywords, $keywords, $keywords, $keywords, $keywords, $keywords, $keywords, $keywords, $keywords, $keywords, $keywords));
return $media;
}