This is the code i have added and it just say error as
Warning: Invalid argument supplied for foreach()
<?php
include '../../config/Database.php';
$pdo = Database::connect();
$q = "select branch_add,branch_Address,branch_landNo , branch_email , Fname from db_thisurienterprice.tbl_employee , db_thisurienterprice.tbl_branch , db_thisurienterprice.tbl_login where employeeBranch = branch_ID and NIC = " .$_SESSION['username'] ."limit 1";
foreach ($pdo->query($q) as $row) {
echo '<label class="control-label">'.$row['Fname'].' </label> <br/>';
echo '<label class="control-label">'.$row['branch_add'].' </label> <br/>';
echo '<label class="control-label">'.$row['branch_Address'].' </label> <br/>';
echo '<label class="control-label">'.$row['branch_landNo'].' </label> <br/>';
echo '<label class="control-label">'.$row['branch_email'].' </label> <br/>';
}
Database::disconnect();
?>
But this works without error if i remove "limit 1" in the query. but that time same record duplicated at 3 times. What seems to be the issue?