|
|
|
->field('p.id, p.level, p.account, count(if(p2.level = '.($level+1).', 1, null)) as lowerCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
|
|
|
|
->field('p.id, p.level, p.account, count(if(p2.level = '.($level+1).', 1, null)) as lowerCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
|
|
|
|
->join("tab_promote p2 on p2.chain like CONCAT(p.chain, p.id, '/%') and or p2.id = p.id", 'left')
|
|
|
|
->join("tab_promote p2 on p2.chain like CONCAT(p.chain, p.id, '/%') or p2.id = p.id", 'left')
|