本文整理汇总了PHP中SingleQryFld函数的典型用法代码示例。如果您正苦于以下问题:PHP SingleQryFld函数的具体用法?PHP SingleQryFld怎么用?PHP SingleQryFld使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SingleQryFld函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: WOFABGenerate
function WOFABGenerate($PROJECT_NO, $conn)
{
$kdAwal = "FAB.WO." . $PROJECT_NO . ".";
$MaxKd = SingleQryFld("SELECT MAX(FAB_NO) FROM MST_FABR WHERE FAB_NO like '{$kdAwal}%'", $conn);
// echo "MAK ID = $MaxKd <br>";
$NextId = intval(str_replace($kdAwal, "", $MaxKd)) + 1;
// echo "$NextId<br>";
return $kdAwal . str_pad($NextId, 4, "0", STR_PAD_LEFT);
}
示例2: PO_NO_generate
function PO_NO_generate($type_po, $datePO, $grandtot, $conn)
{
$newDatePO = new dateTime($datePO);
$kdAwal = $newDatePO->format('md-');
$kdAwal_thn = $newDatePO->format('y');
$grandtot = floatval($grandtot);
// }
if ($type_po == 'NONVAT') {
$emptyPOSQL = "SELECT MIN(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'INACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) > 50 AND TO_NUMBER(SUBSTR(PO_NO,6,2)) <= 70 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
$cekPOIdSql = "SELECT MAX(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'ACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) > 50 AND TO_NUMBER(SUBSTR(PO_NO,6,2)) <= 70 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
if ($grandtot > 3000000) {
$emptyPOSQL = "SELECT MIN(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'INACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) > 70 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
$cekPOIdSql = "SELECT MAX(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'ACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) > 70 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
}
} else {
$emptyPOSQL = "SELECT MIN(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'INACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) <= 50 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
$cekPOIdSql = "SELECT MAX(PO_NO) FROM MST_PO WHERE PO_NO LIKE '{$kdAwal}%' AND PO_STAT = 'ACT' AND PO_TYPE='{$type_po}' " . "AND TO_NUMBER(SUBSTR(PO_NO,6,2)) <= 50 AND SUBSTR(PO_NO,(length(PO_NO)-1),2) = '" . $kdAwal_thn . "' ";
}
$emptyPO = SingleQryFld($emptyPOSQL, $conn);
if ($emptyPO != "") {
return $emptyPO;
} else {
// echo "$cekPOIdSql<br>";
$cekPOIdParse = oci_parse($conn, $cekPOIdSql);
//oci_bind_by_name($cekPOIdParse, ":PONOMAX", $poNo);
oci_execute($cekPOIdParse);
$cekPOId = oci_fetch_array($cekPOIdParse)[0];
// echo "$cekPOId - $type_po";
if ($cekPOId == "" and $type_po == "VAT") {
$num = 1;
$num = str_pad($num, 2, "0", STR_PAD_LEFT);
} elseif ($cekPOId == "" and $type_po == "NONVAT") {
if ($grandtot > 3000000) {
$num = 71;
} else {
$num = 51;
}
} else {
$num = substr($cekPOId, 5);
$num = substr($num, 0, -7);
$num++;
$num = str_pad($num, 2, "0", STR_PAD_LEFT);
}
//echo "$num";
return $kdAwal . $num . '/WEN/' . $kdAwal_thn;
}
}
示例3: while
while ($row = oci_fetch_array($dateParse)) {
echo "<th style='border: 1px ridge black;' class='text-center'>{$row['TANGGAL']}</th>";
array_push($arrayTangal, $row['TANGGAL']);
}
?>
<th style="border: 1px ridge black;" class='text-center'>TOTAL</th>
</tr>
</thead>
<tbody>
<?php
$sql = "SELECT DISTINCT INV_ID, INV_DESC " . "FROM MASTER_INV@WELTESMART_WENLOGINV_LINK " . "WHERE INV_WM_SELECT = '1' " . "ORDER BY INV_DESC ASC";
$parse = oci_parse($conn, $sql);
oci_execute($parse);
while ($row1 = oci_fetch_array($parse)) {
$total = 0;
echo "<tr>";
echo "<td style='border: 1px ridge black;'>{$row1['INV_DESC']}</td>";
for ($index = 0; $index < count($arrayTangal); $index++) {
$querySQl = "SELECT nvl(SUM( MART_WR_INV_QTY),0) " . "FROM MART_CHECKOUT_INFO " . "WHERE MART_WR_JOB = '{$job}' " . "AND TO_CHAR(MART_WR_DATE, 'DD-MM-YYYY') = '{$arrayTangal[$index]}' " . "AND MART_WR_INV_ID = '{$row1['INV_ID']}'";
$query = intval(SingleQryFld("{$querySQl}", $conn));
echo "<td style='border: 1px ridge black;'>{$query}</td>";
$total += intval($query);
}
echo "<td style='border: 1px ridge black;'>{$total}</td>";
echo "</tr>";
}
?>
</tbody>
</table>
</div>
示例4: oci_parse
<th class="text-center">Profile</th>
<th class="text-center">Unit<br>WT/Surf</th>
<th class="text-center">Tgl Akhir<br>Kirim</th>
</tr>
</thead>
<tbody>
<?php
$query = "SELECT * FROM MASTER_DRAWING WHERE PROJECT_NAME = :projectName AND SUBCONT_STATUS = 'NOTASSIGNED' AND DWG_STATUS = 'ACTIVE' ORDER BY HEAD_MARK ASC";
//echo $query;
$result = oci_parse($conn, $query);
oci_bind_by_name($result, ":projectName", $projectName);
oci_execute($result);
$j = 0;
while ($row = oci_fetch_array($result)) {
$qtyAssgment = SingleQryFld("SELECT SUM(UNIT_QTY) AS ASSIGN_QTY FROM FABRICATION WHERE PROJECT_NAME = '{$projectName}' AND HEAD_MARK = '" . $row['HEAD_MARK'] . "'", $conn);
// echo "SELECT SUM(UNIT_PCK_QTY) FROM DTL_PACKING WHERE HEAD_MARK='".$row['HEAD_MARK']."'<br>";
$Qty = intval($row['TOTAL_QTY'] - $qtyAssgment);
?>
<tr>
<td style="text-align: center;" class="text-center">
<?php
if ($row['PPIC_CHECK'] == '0') {
?>
<label class="label label-danger">Not Approve</label>
<?php
} else {
?>
<a href="#lblHM" class="btn btn-success btn-sm" onclick="AddROW('<?php
echo $j;
?>
示例5: str_replace
$v = str_replace(" ", "", $row['HEAD_MARK']);
$perHruf = "";
$str_HM = "";
$int_HM = "";
for ($i = 0; $i < strlen($v); $i++) {
$perHruf = substr($v, $i, 1);
if (is_numeric($perHruf)) {
$int_HM .= $perHruf;
} else {
$str_HM .= $perHruf;
}
}
$fnal_HM = $str_HM . sprintf("%'#4s", $int_HM);
$fnal_HM = str_replace("#", " ", $fnal_HM);
$OPNAME_FAB = SingleQryFld("SELECT nvl(SUM(TOTAL_QTY),0) FROM DTL_OPNAME WHERE HEAD_MARK = '{$row['HEAD_MARK']}'", $conn);
$OPNAME_PNT = SingleQryFld("SELECT nvl(SUM(OPNAME_QTY),0) FROM DTL_OPNAME_PNT WHERE HEAD_MARK = '{$row['HEAD_MARK']}'", $conn);
echo '<tr>';
echo '<td>' . $row['HEAD_MARK'] . '</td>';
echo '<td>' . $row['COMP_TYPE'] . '</td>';
echo '<td>' . $row['PROFILE'] . '</td>';
echo '<td>' . $row['TOTAL_QTY'] . '</td>';
echo '<td>' . $row['WEIGHT'] . '</td>';
echo '<td>' . $row['GR_WEIGHT'] . '</td>';
echo '<td>' . round($row['SURFACE'] * $row['TOTAL_QTY'], 2) . '</td>';
echo '<td>' . round($row['WEIGHT'] * $row['TOTAL_QTY'], 2) . '</td>';
echo '<td>' . round($row['GR_WEIGHT'] * $row['TOTAL_QTY'], 2) . '</td>';
echo '<td>' . $row['LENGTH'] . '</td>';
echo '<td>' . $ASG_qty . '</td>';
echo '<td>' . $SUBCON_info . '</td>';
echo '<td>' . $SPV_info . '</td>';
echo '<td>' . $QC_INSP_info . '</td>';
开发者ID:weltesdeveloper,项目名称:weltesinformationcenter,代码行数:31,代码来源:GeneralReportBuildingXlsGenNEW_backup.php
示例6: htmlentities
$username = htmlentities($_SESSION['username'], ENT_QUOTES);
$this_thurday = strtotime('thursday this week');
$last_thursday = strtotime("last Thursday", $this_thurday);
$last_thursday = date("d-m-Y", $last_thursday);
$job = $_POST['job'];
$subjob = $_POST['subjob'];
$subcont = rtrim($_POST['subcont']);
$tanggal = rtrim($_POST['tanggal']);
$query = "SELECT MAX(DISTINCT(OPN_PERIOD))+1 FROM MST_OPNAME WHERE PROJECT_NO = '{$job}' AND SUBCONT_ID = '{$subcont}' AND to_date(TO_CHAR(OPN_ACT_DATE, 'DD-MM-YYYY'), 'dd-mm-yyyy') <= to_date('{$last_thursday}', 'dd-mm-yyyy')";
//echo "$query";
$newPeriode = SingleQryFld("{$query}", $conn);
if ($newPeriode == "") {
$newPeriode = 1;
}
$subjobInit = SingleQryFld("SELECT PROJECT_CODE FROM VW_PROJ_INFO WHERE PROJECT_NAME_OLD = '{$subjob}'", $conn);
$subcontInit = SingleQryFld("SELECT SUBCONT_CODE FROM SUBCONTRACTOR WHERE SUBCONT_ID = '{$subcont}'", $conn);
$OPNAME_IDX = "{$job}-{$subjobInit}-{$subcontInit}-{$newPeriode}-{$tanggal}";
$OPNAME_ID = str_replace(" ", "", $OPNAME_IDX);
$finalOpnameSql = "SELECT VSOR.* FROM VW_SHOW_OPNAME_PRC VSOR WHERE VSOR.PROJECT_NAME = :PROJNAME " . "AND VSOR.SUBCONT_ID = :SUBCONT AND VSOR.QCPASS <> 0 AND VSOR.QCPASS <> VSOR.QTY_OPN ORDER BY VSOR.HEAD_MARK";
//echo "$finalOpnameSql";
$finalOpnameParse = oci_parse($conn, $finalOpnameSql);
oci_bind_by_name($finalOpnameParse, ":PROJNAME", $subjob);
oci_bind_by_name($finalOpnameParse, ":SUBCONT", $subcont);
oci_execute($finalOpnameParse);
?>
<div class="col-sm-12">
<table id="opnameSource" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th class="text-center" style="vertical-align: middle;">HEADMARK</th>
<th class="text-center" style="vertical-align: middle;">PROFILE</th>
示例7: jumlahREMS
function jumlahREMS($HM, $ID, $PROC_SUB_TYPE, $conn)
{
$sql_jml = "SELECT COUNT(*) FROM MD_PROC_DELAY_REMS WHERE REGEXP_REPLACE (HEAD_MARK, '[[:space:]]+', '') = '" . str_replace(' ', '', $HM) . "' AND ID='{$ID}' " . " AND PROC_SUB_TYPE='{$PROC_SUB_TYPE}' AND ENTRY_DATE = TO_DATE('" . date("m/d/Y") . "','MM/DD/YYYY')";
$jml_now_rems = SingleQryFld($sql_jml, $conn);
return $jml_now_rems;
}
示例8: oci_set_client_identifier
oci_set_client_identifier($conn, $_SESSION['username']);
$username = htmlentities($_SESSION['username'], ENT_QUOTES);
$projName = $_GET['projName'];
$subcont = $_GET['subcont'];
$date1 = $_GET['date1'];
$time1 = strval($_GET['time1']) . ":00";
$dt1 = new dateTime($date1);
$PROJ_NO = SingleQryFld("SELECT PROJECT_NO FROM PROJECT WHERE PROJECT_NAME='{$projName}'", $conn);
$PROJ_DESC = SingleQryFld("SELECT PROJECT_DESC FROM PROJECT WHERE PROJECT_NAME='{$projName}'", $conn);
$CLIENT_NAME = SingleQryFld("SELECT CLIENT_NAME FROM MST_CLIENT WHERE CLIENT_ID in (SELECT CLIENT_ID FROM PROJECT WHERE PROJECT_NAME='{$projName}')", $conn);
$SPV_SQL = "SELECT DISTINCT(SPV_FAB) FROM MASTER_DRAWING_ASSIGNED WHERE PROJECT_NAME='{$projName}' AND SUBCONT_ID='{$subcont}' AND ASSIGNMENT_DATE >= TO_DATE('{$date1} {$time1}', 'MM/DD/YYYY hh24:mi:ss') AND ASSIGNMENT_DATE <= TO_DATE ('{$date1} 23:59:59', 'MM/DD/YYYY hh24:mi:ss')";
// echo "$SPV_SQL<hr>";
$SPV = SingleQryFld($SPV_SQL, $conn);
$QC_INSP_SQL = "SELECT DISTINCT(QC_INSP) FROM MASTER_DRAWING_ASSIGNED WHERE PROJECT_NAME='{$projName}' AND SUBCONT_ID='{$subcont}' AND ASSIGNMENT_DATE >= TO_DATE('{$date1} {$time1}', 'MM/DD/YYYY hh24:mi:ss') AND ASSIGNMENT_DATE <= TO_DATE ('{$date1} 23:59:59', 'MM/DD/YYYY hh24:mi:ss')";
// echo "$QC_INSP_SQL<hr>";
$QC_INSP = SingleQryFld($QC_INSP_SQL, $conn);
// echo "$projName -- $subcont -- $date1 -- $PROJ_NO -- $PROJ_DESC -- $CLIENT_NAME -- $SPV";
// exit();
?>
<!DOCTYPE html>
<html>
<head>
<title>DAILY ASSIGNMENT REPORT</title>
<!-- bootstrap 3.0.2 -->
<link href="../../AdminLTE/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="../../AdminLTE/css/own.css" rel="stylesheet" type="text/css" />
<style type="text/css">
/* table {
width: 97%;
}*/
示例9: oci_parse
$sqlPck = oci_parse($conn, $sql_pack);
oci_execute($sqlPck);
while ($rowPck = oci_fetch_array($sqlPck)) {
$COLI_NUMBER = $rowPck['COLI_NUMBER'];
$PACKING_LENGTH = $rowPck['PACK_LEN'];
$PACKING_WIDTH = $rowPck['PACK_WID'];
$PACKING_HEIGHT = $rowPck['PACK_HT'];
$PACKING_VOLUME = round($PACKING_LENGTH * $PACKING_WIDTH * $PACKING_HEIGHT / 1000000000, 2);
$PACKING_WEIGHT = SingleQryFld("SELECT SUM(UNIT_PCK_WT) FROM VW_PCK_INFO WHERE COLI_NUMBER='{$COLI_NUMBER}'", $conn);
$SHIPMENT_NO = " ";
if (!empty($rowPck['SHIPMENT_NO'])) {
// $SHIPMENT_NO = $rowPck['SHIPMENT_NO'];
}
$DONumber = SingleQryFld("SELECT DO_NO FROM DTL_DELIV WHERE COLI_NUMBER = '{$COLI_NUMBER}'", $conn);
$VehicleNo = SingleQryFld("SELECT VHC_NO FROM MST_DELIV WHERE DO_NO = '{$DONumber}'", $conn);
$DO_DATE = SingleQryFld("SELECT DO_DATE FROM MST_DELIV WHERE DO_NO = '{$DONumber}'", $conn);
?>
<tr class="isi">
<td><?php
echo $i;
?>
</td>
<td><?php
echo $COLI_NUMBER;
?>
</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
示例10: SUM
if ($row['PROCEN_WEIGHT'] == "100") {
echo "-";
} else {
$prosentaseSebelumnya = "SELECT SUM(PROCEN_WEIGHT) FROM VW_INFO_OPNAME_SI WHERE HEAD_MARK = '{$row['HEAD_MARK']}' AND SUBCONT_ID = '{$row['SUBCONT_ID']}'";
$xx = SingleQryFld($prosentaseSebelumnya, $conn);
echo "{$xx}%";
}
?>
</td>
<td class="text-center" style="vertical-align:middle;">
<?php
if ($row['PROCEN_WEIGHT'] == "100") {
echo "-";
} else {
$hargaSebelumnya = "SELECT SUM(PROCEN_WEIGHT*TOTAL_QTY*WEIGHT/100*OPN_PRICE) FROM VW_INFO_OPNAME_SI WHERE HEAD_MARK = '{$row['HEAD_MARK']}' AND SUBCONT_ID = '{$row['SUBCONT_ID']}'";
$yy = SingleQryFld($hargaSebelumnya, $conn);
echo number_format($yy, 2);
}
?>
</td>
<td class="text-center" style="vertical-align:middle;">
<?php
echo $row['QTY_OPNAME'];
?>
</td>
<td class="text-right" style="vertical-align:middle;">
<?php
echo number_format($row['PRICE'], 2);
?>
</td>
<td class="text-center" style="vertical-align:middle;">
示例11: while
while ($row3 = oci_fetch_array($pembawaParse)) {
array_push($pembawa, $row3);
}
$response = array("job" => $job, "spv" => $spv, "pembawa" => $pembawa);
echo json_encode($response);
break;
case "getsubjob":
$job = $_POST['job'];
$subjob = array();
$sql = "SELECT DISTINCT PROJECT_NAME_NEW FROM VW_PROJ_INFO@WELTESMART_WELTES_LINK WHERE PROJECT_NO = '{$job}' ORDER BY PROJECT_NAME_NEW ASC";
$parse = oci_parse($conn, $sql);
oci_execute($parse);
while ($row = oci_fetch_array($parse)) {
array_push($subjob, $row);
}
$query = SingleQryFld("SELECT MAX(MART_WR_ID) FROM MART_MST_CHKOUT WHERE MART_WR_JOB = '{$job}'", $conn);
$nomer = 0;
if ($query != "null") {
$nomer = str_replace("WM-WH-{$job}-", "", $query);
$nomer = intval($nomer) + 1;
} else {
$nomer = intval($nomer) + 1;
}
$id_checkout = "WM-WH-{$job}-" . str_pad($nomer, 5, 0, STR_PAD_LEFT);
$response = array("subjob" => $subjob, "wh_id" => $id_checkout);
echo json_encode($response);
break;
case "show_history":
$start = $_POST['start'];
$end = $_POST['end'];
$job = $_POST['job'];
示例12: array
$styleTableContent = array('font' => array('shrinkToFit' => true, 'size' => 16, 'name' => 'Times New Roman'), 'alignment' => array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER));
$styleBorder = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN)));
// SET DOCUMENT TITLE
$objPHPExcel->setActiveSheetIndex(0)->mergeCells('B1:J1')->setCellValue('B1', "LAPORAN OPNAME {$type}");
$objPHPExcel->setActiveSheetIndex(0)->mergeCells('B2:J2')->setCellValue('B2', 'PT. WELTES ENERGI NUSANTARA');
// SET DOCUMENT MAIN PROPERTIES
$objPHPExcel->setActiveSheetIndex(0)->mergeCells('B4:C4')->setCellValue('B4', 'PERIODE');
$objPHPExcel->setActiveSheetIndex(0)->mergeCells('B5:C5')->setCellValue('B5', 'JOB');
$objPHPExcel->setActiveSheetIndex(0)->mergeCells('B6:C6')->setCellValue('B6', 'SUBJOB');
$objPHPExcel->setActiveSheetIndex(0)->mergeCells('G4:H4')->setCellValue('G4', 'TANGGAL OPNAME');
$objPHPExcel->setActiveSheetIndex(0)->mergeCells('G5:H5')->setCellValue('G5', 'OPNAME TYPE');
//$objPHPExcel->setActiveSheetIndex(0)
// ->mergeCells('B8:C8')
// ->setCellValue('B8', 'SUBCONTRACTOR');
$queryDate = "SELECT to_char(MAX(OPNAME_DATE), 'DD MONTH YYYY') OPNAME_DATE " . "FROM VW_REPORT_OPNAME_PNT " . "WHERE OPNAME_PERIOD = '{$periode}' " . "AND OPNAME_TYPE = '{$type}' " . "AND PROJECT_NO = '{$job}' " . "AND PROJECT_NAME_NEW = '{$subjob}'";
$tangal_opname = SingleQryFld($queryDate, $conn);
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('D4', ": " . "{$periode}");
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('D5', ": " . "{$job}");
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('D6', ": " . "{$subjob}");
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('I4', ": " . $tangal_opname);
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('I5', ": " . "{$type}");
//$objPHPExcel->setActiveSheetIndex(0)
// ->setCellValue('D8', ": " . "GUNADI");
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('B10', 'NO')->setCellValue('C10', 'HEADMARK')->setCellValue('D10', 'COMP TYPE')->setCellValue('E10', 'PROFILE')->setCellValue('F10', 'QC PASS QTY')->setCellValue('G10', 'SURFACE AREA')->setCellValue('H10', 'QTY OPNAME')->setCellValue('I10', 'PRICE')->setCellValue('J10', 'TOTAL PRICE');
$baris = 11;
$no = 0;
$qty = 0;
$price = 0;
$total_price = 0;
$surface = 0;
$opnameDtlSql = "SELECT * FROM VW_REPORT_OPNAME_PNT " . "WHERE OPNAME_PERIOD = '{$periode}' " . "AND OPNAME_TYPE = '{$type}' " . "AND PROJECT_NO = '{$job}' " . "AND PROJECT_NAME_NEW = '{$subjob}' " . "ORDER BY PROJECT_NO, PROJECT_NAME_NEW, COMP_TYPE, HEAD_MARK";
示例13: oci_pconnect
<?php
require_once '../../../../dbinfo.inc.php';
require_once '../../../../FunctionAct.php';
$conn = oci_pconnect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB);
$HM_ID = intval($_POST['HM_ID']);
$HEAD_MARK = strval($_POST['HEAD_MARK']);
$ProjNme = strval($_POST['ProjNme']);
$no = intval($_POST['no']);
$firstQTY = intval($_POST['firstQTY']);
if ($_POST["type"] == "PAINT_QC_PASS") {
# code...
$sql = "SELECT {$_POST['type']} FROM PAINTING_QC WHERE PROJECT_NAME = '{$ProjNme}' AND HEAD_MARK='{$HEAD_MARK}' AND ID='{$HM_ID}' ";
} else {
# code...
$sql = "SELECT {$_POST['type']} FROM PAINTING WHERE PROJECT_NAME = '{$ProjNme}' AND HEAD_MARK='{$HEAD_MARK}' AND ID='{$HM_ID}' ";
}
// echo "$sql";
$jumlhFrst = SingleQryFld("{$sql}", $conn);
if ($jumlhFrst != $firstQTY) {
# code...
echo "<script>showDoubleInput('{$no}','{$HEAD_MARK}')</script>";
}
示例14: oci_pconnect
// GENERATE THE APPLICATION PAGE
$conn = oci_pconnect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB);
// 1. SET THE CLIENT IDENTIFIER AFTER EVERY CALL
// 2. USING UNIQUE VALUE FOR BACK END USER
oci_set_client_identifier($conn, $_SESSION['username']);
$username = htmlentities($_SESSION['username'], ENT_QUOTES);
?>
<?php
switch ($_POST['action']) {
case "cek_duplikat":
$array = array();
$head_mark = strval($_POST['head_mark']);
$project_name = strval($_POST['project_name']);
$sql = "SELECT COUNT(*) FROM MASTER_DRAWING WHERE REPLACE(TRIM(HEAD_MARK), ' ', '') = '{$head_mark}' AND DWG_STATUS = 'ACTIVE'";
$jumlah = SingleQryFld($sql, $conn);
if ($jumlah == "0") {
$response = array("status" => "tidak ada", "data_balik" => $array);
echo json_encode($response);
} else {
$query = "SELECT * FROM MASTER_DRAWING WHERE REPLACE(TRIM(HEAD_MARK), ' ', '') = '{$head_mark}'";
$parse = oci_parse($conn, $query);
oci_execute($parse);
while ($row = oci_fetch_array($parse)) {
array_push($array, $row);
}
$response = array("status" => "ada", "data_balik" => $array);
echo json_encode($response);
}
break;
case "insert_data":
示例15: oci_parse
$sql = "SELECT PCK.* FROM MST_PACKING PCK WHERE PCK.COLI_NUMBER = '{$coliNumber}' ";
// echo "$sql";
$sqlPck = oci_parse($conn, $sql);
oci_execute($sqlPck);
$rowPck = oci_fetch_array($sqlPck, OCI_BOTH);
$PACKING_LENGTH = $rowPck['PACK_LEN'];
$PACKING_WIDTH = $rowPck['PACK_WID'];
$PACKING_HEIGHT = $rowPck['PACK_HT'];
$PROJECT_NAME = $rowPck['PROJECT_NAME'];
$ZON_LOC = $rowPck['ZON_LOC'];
$PACK_TYP = $rowPck['PACK_TYP'];
$BOX_WT = $rowPck['BOX_WT'];
$PACKING_VOLUME = round($PACKING_LENGTH * $PACKING_WIDTH * $PACKING_HEIGHT / 1000000000, 2);
$PACKING_WEIGHT = SingleQryFld("SELECT SUM(UNIT_PCK_WT) FROM VW_PCK_INFO WHERE COLI_NUMBER='{$coliNumber}'", $conn);
$PROJNO = SingleQryFld("SELECT PROJECT_NO FROM VW_PROJ_INFO WHERE PROJECT_NAME_OLD = '{$PROJECT_NAME}'", $conn);
$PROJNM_NEW = SingleQryFld("SELECT PROJECT_NAME_NEW FROM VW_PROJ_INFO WHERE PROJECT_NAME_OLD = '{$PROJECT_NAME}'", $conn);
?>
<div class="container">
<table align="center" class="center">
<thead>
<tr>
<th colspan="5">
<img src="img_packing/weltesLogo.jpg">
</th>
<th colspan="3" rowspan="4">
<img class="table-bordered" src="<?php
echo $PNG_WEB_DIR . basename($filename);
?>
" width="200" height="200">
<!-- <div class="col-xs-11 table-bordered" style="text-align:center;"> -->
<?php