$select = "select f.root_id,f.dateTime,f.name,count(fs.id) as sub_count,CONCAT(u.name,\" \",u.surname) as creator_name_surname".
" from forum as f ".
" left outer join users as u on u.id=f.creator_id".
" left outer join forum as fs on fs.record_root_id=f.root_id"
;
$params = " where fs.status=1 and f.status = 1 and f.record_root_id=$root_id and f.kullanici_firma_id=$kullanici_firma_id";
$group_by =" GROUP BY f.root_id,f.dateTime,f.name";
此查询不列出 f 中的行count(fs.id)=0
。但我需要列出所有其他行,无论计数为 0 还是更大。我的问题是什么?