本文整理汇总了PHP中OW_Example::setLimitClause方法的典型用法代码示例。如果您正苦于以下问题:PHP OW_Example::setLimitClause方法的具体用法?PHP OW_Example::setLimitClause怎么用?PHP OW_Example::setLimitClause使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OW_Example
的用法示例。
在下文中一共展示了OW_Example::setLimitClause方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: findList
public function findList($count)
{
$example = new OW_Example();
$example->setLimitClause(0, $count);
$example->setOrder('timeStamp DESC');
return $this->findListByExample($example);
}
示例2: getTopInviters
/**
* get top inviters
* @param array $params
* @return array YNCONTACTIMPORTER_BOL_Statistic
*/
public function getTopInviters($params = array())
{
$example = new OW_Example();
$example->setLimitClause(0, 10);
$example->setOrder("`totalSent` DESC");
return $this->findListByExample($example);
}
示例3: findByUserId
/**
* Finds user trial plan usage by user Id
*
* @param int $userId
* @return MEMBERSHIP_BOL_MembershipUserTrial
*/
public function findByUserId($userId)
{
$example = new OW_Example();
$example->andFieldEqual('userId', $userId);
$example->setLimitClause(0, 1);
return $this->findObjectByExample($example);
}
示例4: find
public function find($type, $entityId, $userId)
{
$ex = new OW_Example();
$ex->andFieldEqual('type', $type)->andFieldEqual('entityId', $entityId)->andFieldEqual('userId', $userId);
$ex->setLimitClause(0, 1);
return $this->findObjectByExample($ex);
}
示例5: findByUserId
public function findByUserId($userId, $first, $count)
{
$example = new OW_Example();
$example->andFieldEqual(self::USER_ID, (int) $userId);
$example->setLimitClause($first, $count);
return $this->findListByExample($example);
}
示例6: getId
public function getId($moderatorId, $groupId)
{
$ex = new OW_Example();
$ex->andFieldEqual('moderatorId', $moderatorId);
$ex->andFieldEqual('groupId', $groupId);
$ex->setLimitClause(1, 1);
return $this->findIdByExample($ex);
}
示例7: getGoalLatestDonations
public function getGoalLatestDonations($goalId, $limit)
{
$example = new OW_Example();
$example->andFieldEqual('goalId', $goalId);
$example->setOrder('`donationStamp` DESC');
$example->setLimitClause(0, $limit);
return $this->findListByExample($example);
}
示例8: findUserGuests
/**
* @param $userId
* @param $page
* @param $limit
* @return array|mixed
*/
public function findUserGuests($userId, $page, $limit)
{
$first = ($page - 1) * $limit;
$example = new OW_Example();
$example->andFieldEqual('userId', $userId);
$example->setLimitClause($first, $limit);
$example->setOrder('`visitTimestamp` DESC');
return $this->findListByExample($example);
}
示例9: getUpdatedActions
public function getUpdatedActions()
{
$ex = new OW_Example();
$ex->andFieldEqual(PRIVACY_BOL_CronDao::IN_PROCESS, 0);
$ex->setOrder(PRIVACY_BOL_CronDao::TIMESTAMP);
$ex->setLimitClause(0, 500);
$objectList = $this->findListByExample($ex);
return $objectList;
}
示例10: findLast
/**
* Finds user last action log
*
* @param int $userId
* @param int $actionId
*/
public function findLast($userId, $actionId)
{
$example = new OW_Example();
$example->andFieldEqual('userId', $userId);
$example->andFieldEqual('actionId', $actionId);
$example->setOrder('`logTimestamp` DESC');
$example->setLimitClause(0, 1);
return $this->findObjectByExample($example);
}
示例11: findHotList
public function findHotList($start = 0, $count = null)
{
$example = new OW_Example();
$example->setOrder("`timestamp` DESC");
if ($count !== null) {
$example->setLimitClause($start, $count);
}
return $this->findListByExample($example);
}
示例12: findList
public function findList($optionId, $limit = null)
{
$example = new OW_Example();
$example->andFieldEqual('optionId', $optionId);
if (!empty($limit)) {
$example->setLimitClause(0, $limit);
}
$example->setOrder('timeStamp DESC');
return $this->findListByExample($example);
}
示例13: findImages
public function findImages($plugin, $userId = null, $first, $count)
{
$ex = new OW_Example();
$ex->andFieldEqual('plugin', $plugin);
if ($userId !== null && intval($userId) > 0) {
$ex->andFieldEqual('userId', $userId);
}
$ex->setLimitClause($first, $count)->setOrder('stamp DESC');
return $this->findListByExample($ex);
}
示例14: findByEntityTypeList
/**
*
* @param array $entityTypes
* @return array
*/
public function findByEntityTypeList($entityTypes, array $limit = null)
{
$example = new OW_Example();
$example->andFieldInArray("entityType", $entityTypes);
if (!empty($limit)) {
$example->setLimitClause($limit[0], $limit[1]);
}
$example->setOrder("timeStamp DESC");
return $this->findListByExample($example);
}
示例15: getAllProviders
/**
* find All Provider
*
* @param array $params
* @return array YNCONTACTIMPORTER_BOL_Provider
*/
public function getAllProviders($params = array())
{
$example = new OW_Example();
if (isset($params['limit'])) {
$example->setLimitClause(0, $params['limit']);
}
if (isset($params['enable'])) {
$example->andFieldEqual('enable', $params['enable']);
}
$example->setOrder("`order`");
return $this->providerDao->getAllProviders($example);
}