Join with RLIKE

Hi everyone,

I’m new on Yii2, I’ve created CRUD with Gii, but have no luky trying to use the query below:

SELECT cdr.*, cdr_lastdata_alias.alias as lastalias FROM cdr

LEFT JOIN cdr_lastdata_alias ON cdr.lastdata RLIKE cdr_lastdata_alias.expr LIMIT 90

Can someone help-me with this?

use query builder

have a try

$query = new \yii\db\Query;

$result = $query->select('cdr.*, cdr_lastdata_alias.alias as lastalias')


            ->join('LEFT JOIN', 'cdr_lastdata_alias', 'cdr.lastdata RLIKE cdr_lastdata_alias.expr')