本文整理汇总了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();
}