I am unable to get 3 count fields from 3 different tables by using this SQL query below. Can someone help me out where I mistaken. The first count is assigning to another 2 fields. Means if I get 'total_scenarios' count as 10 the remaining 2 options(total_career_sketches, video_count) are taking same value 10.
$this->db->select('users.id,users.name,users.user_lname,users.email,
count(fc_scenarios.user_id) as total_scenarios, count(career_sketch.user_id)
as total_career_sketches, count(video_tracker.user_id) as video_count
,career_timeline.filled_modules');
$this->db->from('users');
$this->db->join('fc_scenarios','users.id = fc_scenarios.user_id AND
fc_scenarios.status = "A" AND fc_scenarios.type = "o"','left');
$this->db->join('career_sketch','users.id = career_sketch.user_id AND
career_sketch.status = "A" AND career_sketch.type = "o"','left');
$this->db->join('video_tracker','users.id = video_tracker.user_id','left');
$this->db->join('career_timeline','users.id =
career_timeline.user_id','left');
$this->db->where('users.inkwiry_user != ',1);
$this->db->where('users.status','A');
$this->db->group_by('users.id');
Thanks, Sateesh