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


PHP table::loadAll方法代码示例

本文整理汇总了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}'); ";
                    }
                }
            }
        }
    }
}
开发者ID:aile54,项目名称:akachan,代码行数:29,代码来源:data.php

示例2: table

					</tr>
					<tr>
						<td class="first" width="75"><strong>Id &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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>
开发者ID:aile54,项目名称:akachan,代码行数:31,代码来源:add.php

示例3: table

						<th class="full" colspan="2">NỘI DUNG</th>
					</tr>
					<tr>
						<td class="first" width="75"><strong>Id &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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 
开发者ID:aile54,项目名称:akachan,代码行数:31,代码来源:edit.php


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