/* News Feed Data */
public function newsFeed()
{
$db = getDB();
$stmt = $db->prepare(\"SELECT user.id as id, user.nome as nome, app.id
You have error in the binding. You have :uid
in the query but :id
in the binding.
This should work:
$stmt = $db->prepare("SELECT app_like.id , reaction.name from app_like, reaction WHERE reaction.id=app_like.reaction_id AND app_like.user_id=:uid AND app_like.app_id=:id");
$stmt->execute(array(':uid' => $uid,
':id' => $msg_id));