Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

activerecord yii2 select with limit(start,end) not working

$Query = new Query;
$Query->select(['um.id as USERid', 'um.first_name', 'um.last_name','um.email','COUNT(g.id) as guestCount'])
->from('user_master um')
->join('LEFT JOIN', 'guest g', 'g.user_id = um.id')
->limit(20)
->offset(12)
->groupBy('um.id')
->orderBy(['um.id' => SORT_DESC]);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #activerecord #select #working
ADD COMMENT
Topic
Name
3+3 =