How to create command as
select * from profile where name like r% limit 12,16 ;
in yii by cdbcriteria or createcommand in yii.
Please help me …thanks in advance,
How to create command as
select * from profile where name like r% limit 12,16 ;
in yii by cdbcriteria or createcommand in yii.
Please help me …thanks in advance,
Do you mean in Yii 2? You can use the Query Builder:
http://www.yiiframework.com/doc-2.0/guide-db-query-builder.html
$rows = (new \yii\db\Query())
->from('profile')
->where(['like', 'name', 'r%', false])
->offset(12)
->limit(16)
->all();
Thanks for reply…