goldsky Reply #1, 1 year, 3 months ago
I dug the xPDO docs and codes, and I couldn't find any reference that related to this searching type.
I'm using a custom table.
For now on, I use some 'deprecated' methods like this:
How to do it with xPDO?
TIA.
I'm using a custom table.
For now on, I use some 'deprecated' methods like this:
<?php
$queryString = "
SELECT *, MATCH(title, url, author, category, level, version, tag, language, summary) AGAINST ('{$str}' IN BOOLEAN MODE) as score
FROM {$this->modx->config['table_prefix']}linx
WHERE MATCH(title, url, author, category, level, version, tag, language, summary) AGAINST ('{$str}' IN BOOLEAN MODE)
ORDER BY score DESC
";
$result = $this->modx->db->query($queryString);
if (!$result) {
echo __LINE__ . ' : #' . mysql_errno() . ' ' . mysql_error() . '<br />' . $queryString . '<br />';
return FALSE;
}
$rowArray = $this->modx->db->makeArray($result);
How to do it with xPDO?
TIA.
