looking for some solutions? You are welcome.

SOLVED: How can i get these through INNER JOINT

M ZOHAIB Ktk:
<?php 
$employee_id = $_SESSION['employee_id'];
$empquery= mysqli_query($db,"select * from employees WHERE `employee_id` = '$employee_id'");
While ($rowemp= mysqli_fetch_assoc($empquery))
{
    $branch_name = $rowemp['branch_name'];
}
$query= mysqli_query($db,"select * from asset_evaluation WHERE `status` = 'NEW' AND `branch_name` = '$branch_name' ");
while($row= mysqli_fetch_assoc($query))
{   
    $supplier_cnic = $row['supplier_cnic'];

    $supplier = mysqli_query($db, "select `supplier_name` FROM suppliers 
        WHERE `supplier_cnic` = '$supplier_cnic' ");
    $outputrow = $supplier->fetch_assoc();  
    $suppplier_name = $outputrow['supplier_name'];

    //echo all values
}



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent