本文整理汇总了PHP中Reply::setModelReply方法的典型用法代码示例。如果您正苦于以下问题:PHP Reply::setModelReply方法的具体用法?PHP Reply::setModelReply怎么用?PHP Reply::setModelReply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reply
的用法示例。
在下文中一共展示了Reply::setModelReply方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadReplyList
protected function loadReplyList()
{
$this->num_per_page = $this->db->real_escape_string($this->num_per_page);
$this->page_num = $this->db->real_escape_string($this->page_num);
$this->newsID = trim($this->db->real_escape_string($this->newsID));
$start_record = $this->page_num * $this->num_per_page;
$query = "select nr.*, ur.UserID, ur.displayName, ur.fullname, ur.fbName, \n\t\t\t\t\tnr.createdDateTime as replyCreatedDateTime from `news_reply` nr \n\t\t\t\t\tinner join user_registration ur on ur.userID = nr.userID\n\t\t\t\t\twhere nr.replyStatus = 'active'\n\t\t\t\t\tand nr.newsID = {$this->newsID} and parentReplyID = 0\n\t\t\t\t\torder by nr.createdDateTime desc limit {$start_record}, {$this->num_per_page}";
$resultArr = $this->db->query($query);
if (is_array($resultArr) && count($resultArr) > 0) {
$replyObj = new Reply(0, $this->withSubReplies);
foreach ($resultArr as $id => $reply) {
$replyResult = $replyObj->setModelReply($reply)->getArray();
$resultArr[$id] = $replyResult["reply"];
}
$this->replyArr["replyList"] = $resultArr;
}
}