Skip to content

Instantly share code, notes, and snippets.

@CharlesCraft50
Created May 1, 2016 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CharlesCraft50/5b141303b7a055609bad0ba4bca6d268 to your computer and use it in GitHub Desktop.
Save CharlesCraft50/5b141303b7a055609bad0ba4bca6d268 to your computer and use it in GitHub Desktop.
if($PostUpVotes = $conn->prepare("SELECT * FROM PostVotes WHERE SubjectName = ? AND VoteType = 'UpVoted'")) {
$PostUpVotes->bind_param('s', $SubjectNamePost);
$PostUpVotes->execute();
$PostUpVotes->store_result();
$postUpVResult = $PostUpVotes->num_rows();
echo "<script>$(\"#UpVoteThis\").html(\"" . "<img src=\\\"UpVoted-Icon.png\\\" width=\\\"30\\\" height=\\\"30\\\"></img> " . $postUpVResult . "" . "\");</script>";
} else {
echo "<pre>Error UpVoting, Error: " . $conn->error . "</pre>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment