当前位置: 首页>>代码示例>>PHP>>正文


PHP Queue::addWhere方法代码示例

本文整理汇总了PHP中Queue::addWhere方法的典型用法代码示例。如果您正苦于以下问题:PHP Queue::addWhere方法的具体用法?PHP Queue::addWhere怎么用?PHP Queue::addWhere使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Queue的用法示例。


在下文中一共展示了Queue::addWhere方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Queue

<?php

include 'config.php';
include PRJ_ROOT_PATH . 'lang/lg_en.php';
include PRJ_CLASS_PATH . 'tzn_generic.php';
include PRJ_CLASS_PATH . TZN_DB_CLASS;
include PRJ_CLASS_PATH . 'pkg_aat.php';
$objItemList = new Queue();
// show today's Queue + Queue with no schedule and undone
$objItemList->addWhere('status < 5');
// --- ordering statement ---
$pSort = $_REQUEST['sort'] ? $_REQUEST['sort'] : (defined('AAT_SORT_COLUMN') ? AAT_SORT_COLUMN : 'finishDate');
$pDir = $_REQUEST['dir'] ? $_REQUEST['dir'] : (defined('AAT_SORT_ORDER') ? AAT_SORT_ORDER : 1);
$objItemList->setOrder($pSort, $pDir);
// number of items to load
$rssSize = '0,' . defined('AAT_RSS_SIZE') ? AAT_RSS_SIZE : 8;
// load
$objItemList->loadList($rssSize);
header('Content-type: text/xml');
echo '<' . '?xml version="1.0"?' . '>';
echo "\n";
?>
<rss version="2.0">
<channel>
<title>AAT Queue! Next queue</title>
<link><?php 
echo PRJ_WWW_URL;
?>
</link>
<?php 
while ($objItem = $objItemList->rNext()) {
开发者ID:window98lsq,项目名称:autoweb,代码行数:31,代码来源:rss.php

示例2: Queue

<?php

include 'config.php';
include PRJ_ROOT_PATH . 'lang/lg_en.php';
include PRJ_CLASS_PATH . 'tzn_generic.php';
include PRJ_CLASS_PATH . TZN_DB_CLASS;
include PRJ_CLASS_PATH . 'pkg_aat.php';
// --- LOAD QUEUES -----------------------------------------------
$objItemList = new Queue();
if ($_REQUEST['sType']) {
    $pType = get_magic_quotes_gpc() ? stripslashes($_REQUEST['sType']) : $_REQUEST['sType'];
    $objItemList->addWhere('type = \'' . addslashes($pType) . '\'');
}
if ($_REQUEST['sContext']) {
    $pContext = $_REQUEST['sContext'];
    $objItemList->addWhere('context = \'' . $pContext . '\'');
}
$sqlFilter = '';
$pShow = $_REQUEST['show'] ? $_REQUEST['show'] : 'today';
if (@constant('AAT_NO_SCHEDULE_TOO')) {
    $sqlToday = ' OR finishDate = \'9999-00-00\'';
    $sqlFuture = ' AND finishDate <> \'9999-00-00\'';
} else {
    $sqlFuture = ' OR finishDate = \'9999-00-00\'';
    $sqlToday = ' AND finishDate <> \'9999-00-00\'';
}
switch ($pShow) {
    case 'all':
        break;
    case 'future':
        // show coming queues and late queues (undone only)
开发者ID:window98lsq,项目名称:autoweb,代码行数:31,代码来源:read_only.php

示例3: Queue

        $_GET['build'] = $_POST['build'] ? $_POST['build'] : $_POST['build2'];
        $_GET['suite'] = "D";
        $_GET['command'] = 1;
        $_GET['testbed'] = "autoqualys";
        $_GET['dbResults'] = "on";
        $_GET['userName'] = "nightly";
        $_GET['tftpIP'] = 1;
        $simple->setAuto($_GET);
        $simple->setUid('');
        $simple->load();
        $simple->add();
    }
}
// --- LOAD Queue -----------------------------------------------
$objItemList = new Queue();
$objItemList->addWhere('((status != 5 and DATE_SUB(CURDATE(),INTERVAL 3 DAY) <= creationDate) or ' . '(status = 5 and DATE_SUB(CURDATE(),INTERVAL 3 DAY) <= creationDate))');
if ($_REQUEST['sTestbed']) {
    $pUserName = get_magic_quotes_gpc() ? stripslashes($_REQUEST['sTestbed']) : $_REQUEST['sTestbed'];
    $objItemList->addWhere('testbed = \'' . addslashes($pUserName) . '\'');
}
if ($_REQUEST['sSuite']) {
    $pSuite = $_REQUEST['sSuite'];
    $objItemList->addWhere('suite = \'' . $pSuite . '\'');
}
$sqlFilter = '';
$pShow = $_REQUEST['show'] ? $_REQUEST['show'] : 'today';
$pKeepNoDead = intval(@constant('JOBQUEUE_NO_SCHEDULE_KEEP') - 1) * 86400;
switch ($pShow) {
    case 'all':
        break;
    case 'future':
开发者ID:window98lsq,项目名称:autoweb,代码行数:31,代码来源:index.php


注:本文中的Queue::addWhere方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。