WIP: Blogposts
This commit is contained in:
@@ -1784,8 +1784,8 @@ function getCommentCount($page_id) {
|
||||
$conn = openDatabaseConnection();
|
||||
|
||||
// Prepare statement to avoid SQL injection
|
||||
$stmt = $conn->prepare("SELECT COUNT(*) FROM comments WHERE page_id = ?");
|
||||
$stmt->bind_param("i", $page_id);
|
||||
$stmt = $conn->prepare("SELECT COUNT(*) FROM comments WHERE `page_id` = ?");
|
||||
$stmt->bind_param("s", $page_id);
|
||||
$stmt->execute();
|
||||
|
||||
// Get result
|
||||
|
||||
Reference in New Issue
Block a user