File manager - Edit - /home/autoph/public_html/pms_v1/ajaxCall/loadActivePCPByCompany.php
Back
<?php include_once("../../../cfg/conn.php"); if(isset($_POST['active'])){ $userID = $_POST['userID']; $selCompID = $_POST['selCompID']; ?> <table style="width:100%;border-collapse:collapse"> <thead> <th class='col-1'>COMPANY</thd> <th class='col-1'>OPERATIONAL PLAN</th> <th class='col-1'>YEAR</th> <th class='col-1'>PERIOD</th> <th class='col-1'></th> <th class='col-1'></th> </thead> <?php $sql = "SELECT * FROM pms_officers WHERE deleted=0 AND `pms_officer_id`='$userID' AND `comp_id`='$selCompID' GROUP BY `comp_id` ORDER BY comp_id ASC"; $getGroup = mysqli_query($conn,$sql); $chkIfExist = mysqli_num_rows($getGroup); if($chkIfExist > 0){ while($row = mysqli_fetch_array($getGroup)){ $pcpEmpID = $row['pms_officer_id']; $sqlPcp = "SELECT * FROM `pcp_headers` WHERE `employee_id`='$pcpEmpID' AND `deleted`=0 AND `status` !='CLOSED' ORDER BY `id` ASC "; $qPCP = mysqli_query($conn,$sqlPcp); while($pcp=mysqli_fetch_array($qPCP)){ echo $row['comp_id']."-".$pcpEmpID."<br>"; } } }else{ echo "<p class='text-center m-2 p-2'>No record found.</p>"; } ?> </table> <?php $conn->close(); } ?>
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings