Hai everybody,
I need help in doctrine raw sql query,
this query count not properly,
$query = $db->prepare("SELECT count(p.friend_id) AS count , p.layer_id, l. *
from layer l, people p
where l.personal_id = :personal_id
and l.id = p.layer_id
");
layer_id friend_id
5 2
6 7
5 3
this is my people table structure,
this query display result count 2 in layer_id 6.
my expected result is
layer_id count
5 2
6 1
anybody plz help me.