當前位置: 首頁>>代碼示例>>PHP>>正文


PHP config::fetch_array方法代碼示例

本文整理匯總了PHP中config::fetch_array方法的典型用法代碼示例。如果您正苦於以下問題:PHP config::fetch_array方法的具體用法?PHP config::fetch_array怎麽用?PHP config::fetch_array使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在config的用法示例。


在下文中一共展示了config::fetch_array方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: AssetGroup

            <?php 
include_once "../class/Config.php";
include_once "../class/AssetGroup.php";
$showGroup = new AssetGroup();
$dbGroup = new config();
$searchType = $_GET["assetTypeCode"];
//$searchType = "01";
$arr = $showGroup->getAssetGroupByType($searchType);
?>
*
            <select id="addAssetGroup">
            <option value="00">หมวดครุภัณฑ์</option>
            <?php 
while ($rowG = $dbGroup->fetch_array($arr)) {
    ?>
            <?php 
    echo "<option value='" . $rowG['assetGroupId'] . "'>";
    echo $rowG['assetTypeCode'] . "" . $rowG['assetGroupCode'] . " " . $rowG['assetGroupName'] . "</option>";
    ?>
      
                <?php 
}
?>
             </select>
           
開發者ID:JhunCabas,項目名稱:asset-project-system,代碼行數:24,代碼來源:addListMenuGroup.php

示例2: Asset

            <?php 
include_once "../class/Config.php";
include_once "../class/Asset.php";
$showAsset = new Asset();
$dbAsset = new config();
$year = $_GET['assetYear'];
/*
$year = $_GET['assetYear'];
$Type = $_GET['assetType'];
$Group = $_GET['assetGroup'];
$asset = $_GET['assetCode'];
*/
//$yearS = $year-543;
$arrType = $showAsset->getShowAssetTypeByYear($year);
?>
            
            <select id="assetTypeQR" onchange="changeTypeQR();">
            <option value="00">ประเภทครุภัณฑ์</option>
            <?php 
while ($row = $dbAsset->fetch_array($arrType)) {
    echo "<option value='" . $row['assetTypeCode'] . "'>";
    echo $row['assetTypeCode'] . " " . $row['assetTypeName'] . "</option>";
}
?>
             </select>
        
開發者ID:JhunCabas,項目名稱:asset-project-system,代碼行數:25,代碼來源:listMenuTypeQR.php

示例3: substr

        <thead>
            <tr>
            	<th style="width: 5%; text-align:center">ลำดับ</th>
                <th style="width: 28%; text-align:center">รหัสประเภทครุภัณฑ์</th>
                <th style="width: 28%; text-align:center">ชื่อประเภทครุภัณฑ์</th>
                <th style="width: 28%; text-align:center">วัน/เดือน/ปี ที่ได้มา</th>
                <th style="width: 10%; text-align:center">แก้ไข</th>
                <th style="width: 10%; text-align:center">ลบ</th>
            </tr>
        </thead>
            <tbody>
            
<?php 
$arr = $assType->getAssetType();
$no = 1;
while ($res = $db->fetch_array($arr)) {
    $datetime = DateTime::createFromFormat('Y-m-d', $res['assetTypeAddDate']);
    $dateT = $datetime->format('d/m/Y');
    $texts = substr($dateT, 6, 4);
    $dates = substr($dateT, 0, 6);
    $years = $texts + 543;
    $showdate = $dates . "" . $years;
    echo "<tr>";
    echo "<td id='Uid" . $no . "' style='text-align:center'>" . $no . "</td>";
    echo "<td id='Uuname" . $no . "' style='text-align:center'>" . $res['assetTypeCode'] . "</td>";
    echo "<td id='Ufname" . $no . "'>" . $res['assetTypeName'] . "</td>";
    echo "<td id='Ulname" . $no . "' style='text-align:center'>" . $showdate . "</td>";
    echo "<td id='Uedit" . $no . "' style='text-align:center'><a class='button icon edit' onClick='getEditType(" . $res['id'] . ");'></a></td>";
    echo "<td id='Udel" . $no . "' style='text-align:center'><a class='button icon remove danger' onClick='delType(" . $res['id'] . ");'></a></td>";
    echo "</tr>";
    $no++;
開發者ID:JhunCabas,項目名稱:asset-project-system,代碼行數:31,代碼來源:tableGroup.php

示例4:

$Group = $_GET['assetGroup'];
$asset = $_GET['assetCode'];
*/
$yearS = $year - 543;
$command = "WHERE assetAddDate LIKE '%" . $year . "%' AND assetTypeCode = '" . $type . "' AND assetGroupCode = '" . $group . "'";
$arrYear = $showAsset->getShowAssetYear();
$arrType = $showType->getAssetType();
//$showGroup->setAssetTypeCode($arrType);
$arrGroup = $showGroup->getAssetGroupByType("01");
$arrAsset = $showAsset->getAssetBy($command);
?>
            
            <select id="assetYearQR" onchange="changePrintQR();">
            <option value="0000">ประจำปี</option>
            <?php 
while ($row = $dbAsset->fetch_array($arrYear)) {
    $selDate = $row['years'];
    $year = $selDate + 543;
    echo "<option value='" . $year . "'>";
    echo $year . "</option>";
}
?>
             </select>
             
              <select id="assetTypeQR" onchange="changePrintQR();">
            <option value="00">ประเภทครุภัณฑ์</option>
            <?php 
while ($rows = $dbAsset->fetch_array($arrType)) {
    ?>
            <?php 
    echo "<option value='" . $rows['assetTypeCode'] . "'>";
開發者ID:JhunCabas,項目名稱:asset-project-system,代碼行數:31,代碼來源:listMenuQR.php

示例5: AssetType

            <?php 
include_once "../class/Config.php";
include_once "../class/AssetType.php";
$showType = new AssetType();
$dbType = new config();
$arr = $showType->getAssetType();
?>
*
            <select id="addAssetType" onchange="changeType();">
            <option value="00">ประเภทครุภัณฑ์</option>
            <?php 
while ($row = $dbType->fetch_array($arr)) {
    ?>
            <?php 
    echo "<option value='" . $row['assetTypeCode'] . "'>";
    echo $row['assetTypeCode'] . " " . $row['assetTypeName'] . "</option>";
    ?>
      
                <?php 
}
?>
             </select>
           
開發者ID:JhunCabas,項目名稱:asset-project-system,代碼行數:22,代碼來源:addListMenuType.php

示例6: Asset

            <?php 
include_once "../class/Config.php";
include_once "../class/Asset.php";
$showAsset = new Asset();
$dbAsset = new config();
/*
$year = $_GET['assetYear'];
$Type = $_GET['assetType'];
$Group = $_GET['assetGroup'];
$asset = $_GET['assetCode'];
*/
//$yearS = $year-543;
$arrYear = $showAsset->getShowAssetYear();
?>
            
            <select id="assetYearQR" onchange="changeYearQR();">
            <option value="0000">ประจำปี</option>
            <?php 
while ($row = $dbAsset->fetch_array($arrYear)) {
    $selDate = $row['years'];
    //$year = $selDate+543;
    echo "<option value='" . $row['assetYear'] . "'>";
    echo $row['assetYear'] . "</option>";
}
?>
             </select>
        
開發者ID:JhunCabas,項目名稱:asset-project-system,代碼行數:26,代碼來源:listMenuYearQR.php

示例7: Asset

<?php

include_once "../class/Config.php";
include_once "../class/Asset.php";
$genAsset = new Asset();
$db = new config();
$year = $_GET["addYear"];
$type = $_GET["addType"];
$group = $_GET["addGroup"];
/*
	$editId = $_GET["id"];
	$editId = $_GET["id"];
	$editId = $_GET["id"];
	$editId = $_GET["id"];
*/
$genAsset->setAssetYear($year);
$genAsset->setAssetTypeCode($type);
$genAsset->setAssetGroupCode($group);
$arr = $genAsset->getAssetMax();
$data_array = array();
$no = 1;
$stat = 0;
$res = $db->fetch_array($arr);
$code = $res['assetCode'];
$genCode = str_pad($code + 1, 3, "0", STR_PAD_LEFT);
echo $genCode;
開發者ID:JhunCabas,項目名稱:asset-project-system,代碼行數:26,代碼來源:reqGenAsset.php

示例8:

            </tr>
        </thead>
            <tbody>
            
<?php 
$no = 1;
$typeCode = $_GET["id"];
//$typeCode = $_GET["id"];
$arr = $assGroup->getAssetGroup();
$arr2 = $assGroup->getAssetGroupByType($typeCode);
if ($typeCode == "00") {
    $cmd = $arr;
} else {
    $cmd = $arr2;
}
while ($res = $db->fetch_array($cmd)) {
    echo "<tr>";
    echo "<td id='Uid" . $no . "' style='text-align:center'>" . $no . "</td>";
    echo "<td id='Ulname" . $no . "' style='text-align:center'>" . $res['assetTypeCode'] . "</td>";
    echo "<td id='Uuname" . $no . "' style='text-align:center'>" . $res['assetTypeCode'] . "" . $res['assetGroupCode'] . "</td>";
    echo "<td id='Ufname" . $no . "'>" . $res['assetGroupName'] . "</td>";
    echo "<td id='Uedit" . $no . "' style='text-align:center'><a class='button icon edit' onClick='getEditGroup(" . $res['id'] . ");'></a></td>";
    echo "<td id='Udel" . $no . "' style='text-align:center'><a class='button icon remove danger' onClick='delGroup(" . $res['id'] . ");'></a></td>";
    echo "</tr>";
    $no++;
}
?>
        </tbody>
    </table>

   
開發者ID:JhunCabas,項目名稱:asset-project-system,代碼行數:29,代碼來源:tableGroup.php

示例9: Asset

<?php

//****************************************************************//
//****************************************************************//
//** ชื่อไฟล์ : listMenuGroupQR.php
//** คำอธิบาย : ไฟล์นี้เป็น แสดง ListMenu หมวดครุภัณฑ์ หน้า QR
//** Version : 1.0
//** Credit : นัฐวุฒิ เผือกทอง
//****************************************************************//
//****************************************************************//
include_once "../class/Config.php";
include_once "../class/Asset.php";
$showAsset = new Asset();
$dbAsset = new config();
$year = $_GET['assetYear'];
$type = $_GET['assetType'];
$arrGroup = $showAsset->getShowAssetGroupByType($year, $type);
?>
    <select id="assetGroupQR" onchange="changeGroupQR();">
    <option value="00">หมวดครุภัณฑ์</option>
<?php 
while ($row = $dbAsset->fetch_array($arrGroup)) {
    echo "<option value='" . $row['assetGroupId'] . "'>";
    echo $row['assetTypeCode'] . "" . $row['assetGroupCode'] . " " . $row['assetGroupName'] . "</option>";
}
?>
 	</select>
開發者ID:JhunCabas,項目名稱:asset-project-system,代碼行數:27,代碼來源:listMenuGroupQR.php

示例10:

$year = "2556";
$type = "01";
$group = "01";
/*
$year = $_GET['assetYear'];
$type = $_GET['assetType'];
$group = $_GET['assetGroup'];
*/
//$yearS = $year-543;
$arrAsset = $showAsset->getShowAssetByGroup($year, $type, $group);
$arrAsset2 = $showAsset->getShowAssetByGroup($year, $type, $group);
?>
            ตั้งแต่ : 
            <select id="assetQRStart" onchange="">
            <?php 
while ($row = $dbAsset->fetch_array($arrAsset)) {
    echo "<option value='" . $row['assetCode'] . "'>";
    echo $row['assetCode'] . "</option>";
}
?>
             </select>
             ถึง : 
              <select id="assetQREnd" onchange="">
            <?php 
while ($rows = $dbAsset->fetch_array($arrAsset2)) {
    echo "<option value='" . $rows['assetCode'] . "'>";
    echo $rows['assetCode'] . "</option>";
}
?>
             </select>
            &nbsp;&nbsp;
開發者ID:JhunCabas,項目名稱:asset-project-system,代碼行數:31,代碼來源:listMenuAssetQR.php


注:本文中的config::fetch_array方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。