Antwortmöglichkeit
This commit is contained in:
@@ -162,11 +162,22 @@ class DatabaseCommentManager implements CommentManagerDAO
|
|||||||
$db = $this->getConnection();
|
$db = $this->getConnection();
|
||||||
|
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT *
|
SELECT
|
||||||
FROM comments
|
id,
|
||||||
WHERE article_id = :articleId
|
article_id,
|
||||||
ORDER BY created ASC
|
CASE
|
||||||
";
|
WHEN parent_comment_id IS NULL THEN NULL
|
||||||
|
WHEN parent_comment_id = '' THEN NULL
|
||||||
|
WHEN parent_comment_id = 0 THEN NULL
|
||||||
|
ELSE parent_comment_id
|
||||||
|
END AS parent_comment_id,
|
||||||
|
author,
|
||||||
|
content,
|
||||||
|
created
|
||||||
|
FROM comments
|
||||||
|
WHERE article_id = :articleId
|
||||||
|
ORDER BY created ASC
|
||||||
|
";
|
||||||
|
|
||||||
$command = $db->prepare($sql);
|
$command = $db->prepare($sql);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user