當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。