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


PHP Stack::Stack方法代碼示例

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


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

示例1: Inbox

 function Inbox($POD, $count = 20, $offset = 0)
 {
     $this->POD = $POD;
     if (!$this->POD) {
         return false;
     }
     if (!$this->POD->isAuthenticated()) {
         return false;
     }
     // get unread count.
     $sql = "SELECT count(1) as count FROM messages WHERE userId=" . $this->POD->currentUser()->get('id') . " and status='new';";
     $this->POD->tolog($sql, 2);
     $res = mysql_query($sql, $this->POD->DATABASE);
     if ($ur = mysql_fetch_assoc($res)) {
         $this->UNREAD_COUNT = $ur['count'];
     }
     mysql_free_result($res);
     $conditions = array();
     $conditions['userId'] = $this->POD->currentUser()->get('id');
     $sort = 'GROUP by targetUserId ORDER BY max(date) DESC';
     $tables = 'FROM messages m';
     $select = 'SELECT m.targetUserId as id, m.userId as ownerId,m.targetUserId,max(m.date) as latestMessage,(TIME_TO_SEC(TIMEDIFF(NOW(),max(date))) / 60) as minutes';
     parent::Stack($POD, 'threads', $conditions, $sort, $count, $offset, $tables, $select);
     return $this;
 }
開發者ID:RichieDupes,項目名稱:PeoplePods,代碼行數:25,代碼來源:Messages.php

示例2: RBStack

 function RBStack()
 {
     Stack::Stack();
     $this->marker_ar = new Stack();
 }
開發者ID:eguicciardi,項目名稱:ada,代碼行數:5,代碼來源:rbstack.inc.php


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