I using three table with foreign key, the in first table I add the fullname, and in second table I add product, and in three table I add the id number for both tables (first and second).
I want to list the fullname even if they don’t have products
my code
<tbody>
<?php
$i = 1;
$qry = $conn->query("SELECT first.*, second.* FROM first JOIN three ON first.id = three.fullnameid
JOIN second ON second.id = three.careedid order by second.id desc ");
while($row= $qry->fetch_assoc()):
?>
<tr>
<th class="text-center"><?php echo $i++ ?></th>
<td><b><?php echo htmlentities($row['name']); ?></b></td>
<td><b><?php echo htmlentities($row['surname']); ?></b></td>
<td><b><?php echo htmlentities($row['career']); ?></b></td>
</tr>
<?php endwhile; ?>
</tbody>