Не пойму, откуда берется ошибка:
Код: Выделить всё
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''string')' at line 1
The SQL being executed was: SELECT * FROM idx_news_content WHERE MATCH('string')
Код: Выделить всё
$sql = "SELECT * FROM idx_news_content WHERE MATCH('$keyword')";
$data = Yii::$app->sphinx->createCommand($sql)->queryAll();