本文整理汇总了PHP中table::loadAll方法的典型用法代码示例。如果您正苦于以下问题:PHP table::loadAll方法的具体用法?PHP table::loadAll怎么用?PHP table::loadAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类table
的用法示例。
在下文中一共展示了table::loadAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: table
<?php
include '../../library/loader.php';
echo "\r\n\r\n//var hide_empty_list=true; //uncomment this line to hide empty selection lists\r\n\r\nvar disable_empty_list=true; //uncomment this line to disable empty selection lists\r\n\r\naddListGroup('group', 'car-makers');\r\n\r\naddOption('car-makers', 'Chọn chủng loại rượu', 'null', '', 1); //Empty starter option\r\n\r\n";
$tbl = new table('sections2');
$res = $tbl->loadAll();
if ($res) {
while ($row = mysql_fetch_object($res)) {
echo " addList('car-makers', '{$row->name}', '{$row->id}', '{$row->name}.{$row->id}'); ";
echo " addOption('{$row->name}.{$row->id}', 'Chọn danh mục rượu', 'null', '', 1); ";
// list category
$tblCate = new table('category2');
$resCate = $tblCate->loadOne("sections = {$row->id}");
if ($resCate) {
while ($rowCate = mysql_fetch_object($resCate)) {
echo " addList('{$row->name}.{$row->id}', '{$rowCate->name}', '{$rowCate->id}', '{$rowCate->name}.{$rowCate->id}'); ";
// list subcate
$tblSub = new table('subcate2');
$resSub = $tblSub->loadOne("secid = {$row->id} and catid = {$rowCate->id}");
if ($resSub) {
echo " addOption('{$rowCate->name}.{$rowCate->id}', 'Chọn danh mục con', 'null'); ";
while ($rowSub = mysql_fetch_object($resSub)) {
echo " addOption('{$rowCate->name}.{$rowCate->id}', '{$rowSub->name}', '{$rowSub->id}'); ";
}
}
}
}
}
}
示例2: table
</tr>
<tr>
<td class="first" width="75"><strong>Id </strong></td>
<td width="536" class="last">#<?php
echo $tbl->getLastId() + 1;
?>
</td>
</tr>
<tr>
<td class="first" width="75"><strong>Danh mục (*)</strong></td>
<td colspan="2" class="last">
<select name="catid" id="danhmuc">
<option value="">---[Chọn một]---</option>
<?php
$tbl_cat = new table('category_adv');
$res_cat = $tbl_cat->loadAll();
while ($row_cat = mysql_fetch_array($res_cat)) {
?>
<option value="<?php
echo $row_cat['id'];
?>
"><?php
echo $row_cat['name'];
?>
</option>
<?php
}
?>
</select>
</td>
</tr>
示例3: table
<th class="full" colspan="2">NỘI DUNG</th>
</tr>
<tr>
<td class="first" width="75"><strong>Id </strong></td>
<td width="536" class="last">#<?php
echo $id;
?>
</td>
</tr>
<tr>
<td class="first"><strong>Danh mục 1</strong></td>
<td class="last"><select name="catid1" onchange="get_('components/category3/xuly.php',this.value,'cat2')">
<option value="">---[Chọn một]---</option>
<?php
$tbl_cat = new table('category1');
$res_cat = $tbl_cat->loadAll('order by ordering');
while ($row_cat = mysql_fetch_array($res_cat)) {
?>
<option value="<?php
echo $row_cat['id'];
?>
" <?php
if ($row['catid1'] == $row_cat['id']) {
echo 'selected';
}
?>
><?php
echo $row_cat['name'];
?>
</option>
<?php