當前位置: 首頁>>代碼示例>>PHP>>正文


PHP messages::view_unread_messages方法代碼示例

本文整理匯總了PHP中messages::view_unread_messages方法的典型用法代碼示例。如果您正苦於以下問題:PHP messages::view_unread_messages方法的具體用法?PHP messages::view_unread_messages怎麽用?PHP messages::view_unread_messages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在messages的用法示例。


在下文中一共展示了messages::view_unread_messages方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: database

        break;
}
//retrieve the users workflow he had been assign ...
$db = new database();
$sql = "select * from user_stage us,\r\n\t\tstages s\r\n\t\twhere us.userID = {$userID}\r\n\t\tand\ts.stageID = us.stageID ";
// print $sql;
if (!($result = $db->query($sql))) {
    die('Error:' . $db->error());
}
$user_stage = array();
while ($row = $db->fetcharray()) {
    $user_stage[] = $row;
}
$db->freeresult();
$msg = new messages();
$messages = $msg->view_unread_messages($userID);
$total_unread_messages = count($messages) - 1;
$fb = new feedbacks();
$feedbacks = $fb->view_unread_feedbacks(1);
$total_unread_feedbacks = count($feedbacks) - 1;
$feedbacks = $fb->view_unread_feedbacks(2);
$total_unread_sources = count($feedbacks) - 1;
// get all articles belong in da specific category and edit by this editor assigned on dat category
if ($editor_on_category) {
    $sql = "select * from article_versions av, article_category ac where \r\n\t\t\t((av.stageID = 2 and av.status != 'revise') or (av.stageID = 3 and av.status = 'revise' )) \r\n\t\t\tand (( av.isarchive = '0' and ( ac.articleID = av.articleID ) and ( ac.categoryID = '{$assigned_category}' ))) order by av.created DESC \r\n\t";
} else {
    // wil display all articles regardless of category so that this user can edit them..
    $sql = "select * from article_versions av where \r\n\t\t\t(av.stageID = 2 and av.status != 'revise') or (av.stageID = 3 and av.status = 'revise' ) \r\n\t\t\tand av.isarchive = '0' order by av.created DESC \r\n\t";
}
if (!($result = $db->query($sql))) {
    die('Error:' . $db->error());
開發者ID:sudogem,項目名稱:brcms,代碼行數:31,代碼來源:main_content2.php


注:本文中的messages::view_unread_messages方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。