I guys I am having a bit of an issue with this
I have a select statement which looks like this belows
$stmt = $conn->prepare("SELECT * FROM Product WHERE id=:id");
$stmt->bindParam('id',$id);
$stmt->execute();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if($row) {];
?>
<div> <?echo $row['Name']; >? </div>
<div> <?echo $row['Type']; >? </div>
$stmt1 = $conn->prepare("SELECT * FROM user WHERE Username IN ('john',
'sarah', 'james')");
$stmt1->bindParam('id',$id);
$stmt1->execute();
$row1 = $stmt1->fetch(PDO::FETCH_ASSOC);
if($row1) {];
?>
<div> <?echo $row1['username']; ?>' </div>
<? } ?> //closing for the second select statement
<? } ?> //closing for the first select statement
The problem
The page render but where I have use SELECT * FROM user WHERE Username IN ('john',
'sarah', 'james')
it is only showing one name instead of 3 names.
I know the select statement works because I try it in phpmyadmin and it does show all 3 names