Мисля, че не включихте параметрите в единични кавички. Опитайте този код
$query = "SELECT `ent`.`Entity_Id`, `ent`.`Profile_Pic_Url`, `ent`.`First_Name`, `ent`.`Last_Name`, `ent`.`Last_CheckIn_Place`, `comments`.`Content`
FROM `checkin_comments` AS `comments`
JOIN `entity` AS `ent`
ON `comments`.`Entity_Id` = `ent`.`Entity_Id`
LEFT JOIN `friends` AS `f`
ON `ent`.`Entity_Id` = ':entityId'
WHERE `comments`.`Chk_Id` = ':checkInId'
AND `f`.`Category` != 4
GROUP BY `comments`.`Comment_Id`
";
// Bind the parameters to the query
$data = Array(":checkInId" => (int)$checkInId, ":entityId" => (int)$userId);
Надявам се това да помогне.