本文整理匯總了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;
}
示例2: RBStack
function RBStack()
{
Stack::Stack();
$this->marker_ar = new Stack();
}