本文整理匯總了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;
}
}