本文整理汇总了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>
示例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>
示例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++;
示例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'] . "'>";
示例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>
示例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>
示例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;
示例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>
示例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>
示例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>