我想在 yii 框架中创建一个如下所示的 sql 查询:
mysql> SELECT id, body, MATCH (title,body) AGAINST
-> ('Security implications of running MySQL as root') AS score
-> FROM articles WHERE MATCH (title,body) AGAINST
-> ('Security implications of running MySQL as root');
我试试这个,但它不工作:
$dataProvider = new CActiveDataProvider('data', array(
'criteria'=>array(
'condition' => 'MATCH (title,body) AGAINST ('Security implications of running MySQL as root') AS score',
WHERE MATCH (title,body) AGAINST ('Security implications of running MySQL as root')
'limit' => '20', ),
'pagination' => false
));