Class for Yii2 PHP framework helps to generate insert sql query from other tables.
This class helps to create query as below:
insert into rights_cache(id,login,type,date_in)
select id,login,type,now()
from rights
where date_in>date_trunc('day',now());
Example usage:
$query = new QueryInsert;
$query->select(['login','docid'])
->from($tblTemp)
->where(['in','docid' , $docids]);
$query->insert(DA::tableName(),['login','docid']);
Comments