匹配 - 在蛋糕PHP中对战



我是 CakePHP 的新手,现在我无法转换查询:

SELECT *, 
MATCH (title, post, tags) AGAINST ('dialux' IN BOOLEAN MODE) as REL
FROM posts 
WHERE MATCH (title, post, tags) AGAINST ('dialux' IN BOOLEAN MODE)
ORDER BY REL DESC;

在这样的内容中:

$this->Post->find('all', xxx);

有什么想法吗?谢谢。

不确定这是否有帮助,因为它来自 mark 已经建议的页面

但是你可以尝试这样的事情:

$query = 'SELECT *, 
MATCH (title, post, tags) AGAINST ('dialux' IN BOOLEAN MODE) as REL
FROM posts 
WHERE MATCH (title, post, tags) AGAINST ('dialux' IN BOOLEAN MODE)
ORDER BY REL DESC;';
$this->Post->query($query);

相关内容

  • 没有找到相关文章

最新更新