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