-2
Hello beast friends in PHP, can anyone help me? I can’t find the error in the following public function:
public function addLike($user_id, $tweet_id, $get_id){
$stmt = $this->pdo->prepare("UPDATE 'tweets' SET 'likesCount' = 'likesCount' +1 WHERE 'tweetID' = :tweet_id");
$stmt->bindParam(":tweet_id", $tweet_id, PDO::PARAM_INT);
$stmt->execute();
$this-> create('likes', array('likeBy' => $user_id, 'likeOn' => $tweet_id));
}
If anyone knows the mistake and can help, I thank them. I embrace them all.