- $stmt = dba::p('SELECT `id`
- FROM `group`
- INNER JOIN `group_member`
- ON `group_member`.`gid` = `group`.`id`
- WHERE `group`.`uid` = ?
- AND `group_member`.`contact-id` = ?',
- $uid,
- $cid
- );
+ $condition = ['uid' => $uid, 'contact-id' => $cid];
+ $stmt = dba::select('group_member', ['gid'], $condition);