Hi Folks,
I am having problem with my web design. I am making a query that involves two table but it doesnt do anything when i click submit. do i make mistake in the query ?
my code is like this,
<?php
if ($_POST['action'] == 'show'){
$requestCompSql = "SELECT REQUEST_COMPONENT_CUTTING.PROJECT_NAME,
REQUEST_COMPONENT_CUTTING.BASE_PLATE,
REQUEST_COMPONENT_CUTTING.THICKNESS,
REQUEST_COMPONENT_CUTTING.QTY_REQUESTED,
COMPONENT_CUTTING.QTY_REQUIRED,
REQUEST_COMPONENT_CUTTING.REQUESTER,
REQUEST_COMPONENT_CUTTING.REQUEST_DATE
FROM REQUEST_COMPONENT_CUTTING INNER JOIN COMPONENT_CUTTING
ON REQUEST_COMPONENT_CUTTING.PROJECT_NAME = COMPONENT_CUTTING.PROJECT_NAME
WHERE REQUEST_COMPONENT_CUTTING.THICKNESS = COMPONENT_CUTTING.THICKNESS
AND REQUEST_COMPONENT_CUTTING.BASE_PLATE = COMPONENT_CUTTING.BASE_PLATE
AND COMPONENT_CUTTING.BASE_PLATE = '{$_POST["bp"]}'";
$requestCompParse = oci_parse($conn, $requestCompSql);
oci_execute($requestCompParse);
while($row = oci_fetch_assoc($requestCompParse)){
echo "<div class='table-responsive'>";
echo "<table class='table table-bordered'>";
echo '<table cellspacing = "0"';
echo '<thead>';
echo '<tr>
<th>PROJECT</th>
<th>BASEPLATE</th>
<th>THICKNESS</th>
<th>QTY REQUESTED</th>
<th>QTY REQUIRED</th>
<th>REQUESTER</th>
<th>REQ. DATE</th>
<th align="center">ACTION</th>
</tr>
</thead>';
echo "<tbody>";
echo "<tr class='warning'><td>$row[PROJECT_NAME]</td>";
echo "<td>$row[BASE_PLATE]</td>";
echo "<td>$row[THICKNESS]</td>";
echo "<td>$row[QTY_REQUESTED]</td>";
echo "<td>$row[QTY_REQUIRED]</td>";
echo "<td>$row[REQUESTER]</td>";
echo "<td>$row[REQUEST_DATE]</td>";
echo "<td><input type='button' value='OK' class='btn btn-success'>
<input type='button' value='REJECT' class='btn btn-danger'></td>";
echo "</tr>";
echo "</tbody>";
echo "<table cellspacing = '0'";
echo "</div>";
}
}
?>