|
|
|
ช่วยหน่อยคับ มัน searchไม่ขึ้นคับไม่รู้ว่าผิดตรงไหน "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =192.9.150.7)(PORT = 1521))) |
|
|
|
|
|
|
|
มันsearchไม่ขึ้นคับไม่รู้ว่าผิดตรงไหนCode (PHP)
<html>
<head>
<title>Mercury Material Transaction</title>
</head>
<body>
<center>
<?
$db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =192.9.150.7)(PORT = 1521)))(CONNECT_DATA=(SID=vis)))";
$filter = "";
$c1 = OCILogon("apps","apps",$db);
if($_POST["transaction_date"]==""){
$filter = "and transaction_date LIKE '".$_POST["transaction_date"]."' ";
}
if($_POST["item_number"]==""){
$filter = " and item_number LIKE '".$_POST["item_number"]."' ";
}
if($_POST["item_description"]==""){
$filter = " and item_description LIKE '".$_POST["item_description"]."' ";
}
if($_POST["transaction_type_name"]==""){
$filter = " and transaction_type_name LIKE '".$_POST["transaction_type_name"]."' ";
}
if($_POST["subinventory_code"]==""){
$filter = " and subinventory_code LIKE '".$_POST["subinventory_code"]."' ";
}
if($_POST["locator_name"]==""){
$filter = " and locator_name LIKE '".$_POST["locator_name"]."' ";
}
if($_POST["transfer_subinventory"]==""){
$filter = " and transfer_subinventory LIKE '".$_POST["transfer_subinventory"]."' ";
}
if($_POST["transfer_locator"]==""){
$filter = " and transfer_locator LIKE '".$_POST["transfer_locator"]."' ";
}
if($_POST["transaction_reference"]==""){
$filter = " and transaction_reference LIKE '".$_POST["transaction_reference"]."' ";
}
if($_POST["reason_name"]==""){
$filter = " and reason_name LIKE '".$_POST["reason_name"]."' ";
}
if($_POST["creation_date"]==""){
$filter = " and creation_date LIKE '".$_POST["creation_date"]."' ";
}
if($_POST["created_name"]==""){
$filter = " and created_name LIKE '".$_POST["created_name"]."' ";
}
$strSQL ="select * from pt_mercury_material_trans where (1=1) ".$filter."order by transaction_date , transaction_id";
$objParse = OCIParse($c1, $strSQL);
OCIExecute($objParse, OCI_DEFAULT) or die("Can't not execute statment");
?>
<table width="600" border="1">
<tr>
<td align="center">ID</td>
<td align="center">Transaction Date</td>
<td align="center">Item No</td>
<td align="center">Description</td>
<td align="center">Transaction Type</td>
<td align="center">Subinventory</td>
<td align="center">Locator</td>
<td align="center">Transfer Subinv.</td>
<td align="center">Transfer Locator</td>
<td align="center">Reference</td>
<td align="center">Reason</td>
<td align="center">Creation Date</td>
<td align="center">Created Name</td>
</tr>
<?
while(OCIFetch($objParse)){
?>
<tr>
<td><?=OCIResult($objParse,"TRANSACTION_ID")?></td>
<td><?=OCIResult($objParse,"TRANSACTION_DATE")?></td>
<td><?=OCIResult($objParse,"ITEM_NUMBER")?></td>
<td><?=OCIResult($objParse,"ITEM_DESCRIPTION")?></td>
<td><?=OCIResult($objParse,"TRANSACTION_TYPE_NAME")?></td>
<td><?=OCIResult($objParse,"SUBINVENTORY_CODE")?></td>
<td><?=OCIResult($objParse,"LOCATOR_NAME")?></td>
<td><?=OCIResult($objParse,"TRANSFER_SUBINVENTORY")?></td>
<td><?=OCIResult($objParse,"TRANSFER_LOCATOR")?></td>
<td><?=OCIResult($objParse,"TRANSACTION_REFERENCE")?></td>
<td><?=OCIResult($objParse,"REASON_NAME")?></td>
<td><?=OCIResult($objParse,"CREATION_DATE")?></td>
<td><?=OCIResult($objParse,"CREATED_NAME")?></td>
</tr>
<?
}
?>
</table>
<?
ocilogoff($c1);
?>
</center>
</body>
</html>
Tag : - - - -
|
|
|
|
|
|
Date :
2010-03-24 14:28:45 |
By :
lukchang |
View :
777 |
Reply :
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|