本文整理汇总了PHP中BxDolDb::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP BxDolDb::getAll方法的具体用法?PHP BxDolDb::getAll怎么用?PHP BxDolDb::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BxDolDb
的用法示例。
在下文中一共展示了BxDolDb::getAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionPending
function actionPending()
{
$oDb = new BxDolDb();
$sFormName = 'categories_aprove_form';
$aItems = array();
if (is_array($_POST['pathes']) && !empty($_POST['pathes'])) {
foreach ($_POST['pathes'] as $sValue) {
list($sCategory, $sId, $sType) = split('%%', process_db_input($sValue, BX_TAGS_STRIP));
$oDb->query("UPDATE `sys_categories` SET `Status` = 'active' WHERE\n `Category` = '{$sCategory}' AND `ID` = {$sId} AND `Type` = '{$sType}'");
}
}
$aCategories = $oDb->getAll("SELECT * FROM `sys_categories` WHERE `Status` = 'passive'");
if (!empty($aCategories)) {
foreach ($aCategories as $aCategory) {
$aItems[] = array('name' => $aCategory['Category'], 'value' => $aCategory['Category'] . '%%' . $aCategory['ID'] . '%%' . $aCategory['Type'], 'title' => $aCategory['Category'] . '(' . $aCategory['Type'] . ')');
}
$aButtons = array('action_activate' => _t('_categ_btn_activate'));
$sControls = BxTemplSearchResult::showAdminActionsPanel($sFormName, $aButtons, 'pathes');
return $GLOBALS['oAdmTemplate']->parseHtmlByName('categories_list.html', array('form_name' => $sFormName, 'bx_repeat:items' => $aItems, 'controls' => $sControls));
} else {
return MsgBox(_t('_Empty'));
}
}
示例2: getData
function getData()
{
$oDb = new BxDolDb();
return $oDb->getAll("SELECT *, DAYOFMONTH(`Date`) AS `Day`\n FROM `sys_tags`\n WHERE `Date` >= TIMESTAMP('{$this->iYear}-{$this->iMonth}-1') AND `Date` < TIMESTAMP('{$this->iNextYear}-{$this->iNextMonth}-1')");
}
示例3: getData
function getData()
{
$oDb = new BxDolDb();
return $oDb->getAll("SELECT *, DAYOFMONTH(`Date`) AS `Day`\n FROM `sys_categories`\n WHERE `Date` >= TIMESTAMP('{$this->iYear}-{$this->iMonth}-1')\n AND `Date` < TIMESTAMP('{$this->iNextYear}-{$this->iNextMonth}-1')\n AND `Owner` <> 0 AND `Status` = 'active'");
}