Note that because the SQL statement is already specified, calling additional
query modification methods (such as
where(),
order()) on the created
ActiveQuery
instance will have no effect. However, calling
with(),
asArray() or
indexBy() is
still fine.
Below is an example:
php
$customers = Article::findBySql("SELECT * FROM idx_article
WHERE MATCH('development')")->all();