$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";
This query does not list the rows in f with count(fs.id)=0
. But I need to list all other rows no matter count 0 or greater. What is my problem?