public function getOwnerID($objectID)
{
$sql = "SELECT article.userID
- FROM wcf" . WCF_N . "_comment comment
- LEFT JOIN wcf" . WCF_N . "_article article
- ON article.articleID = comment.objectID
+ FROM wcf1_comment comment
+ INNER JOIN wcf1_article_content article_content
+ ON article_content.articleContentID = comment.objectID
+ INNER JOIN wcf1_article article
+ ON article_content.articleID = article.articleID
WHERE comment.commentID = ?";
- $statement = WCF::getDB()->prepareStatement($sql);
+ $statement = WCF::getDB()->prepare($sql);
$statement->execute([$objectID]);
return $statement->fetchSingleColumn() ?: 0;