$query=$_sql->query("SELECT `comments`.*, users.userName AS bySlug, users.userPublicName AS byName, users.userPic FROM `comments` INNER JOIN users ON commentBy = userId WHERE commentEntry = ".$this->id." AND commentReply = 0 ORDER BY commentTime DESC");
if($check)
return$query->num_rows;
else
$this->comments=$query;
}
return$this->comments->fetch_assoc();
}
publicfunctionget_replies($check=false)
{
if(!$this->replies)
{
global$_sql;
$query=$_sql->query("SELECT `comments`.*, users.userName AS bySlug, users.userPublicName AS byName, users.userPic FROM `comments` INNER JOIN users ON commentBy = userId WHERE commentReply = ".$this->id." ORDER BY commentTime DESC");