I got this error after writing PHP:
Warning: mysql_result() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\LikeButton\core\func\lik... on line 9

Here is my code:
return (mysql_result(mysql_query("SELECT COUNT (`like_id`) FROM `likes` WHERE `user_id` = ".$_SESSION['user_id']." AND `article_id` = $article_id"), 0) == 0) ? false : true;
Which Outputs The Error And Doesn't return what i've told it too: 'You've Already Like This'

However when i have deleted the ==0 It Returns 'You've Already Liked This', but still gives me the error

If You Can't Tell The Problem, Could You Atleast Point Me In The Direction Or Tell Me Whats worng/what the error means?

Thanks For Reading