Yes, now I know about JOIN, but still didn't solve this problem.
$gender = 6;
$result = mysqli_query($con,"SELECT * FROM ps_customer c LEFT JOIN ps_adress a ON a.customer_id=c.customer_id WHERE c.id_gender='$gender'");
var_dump($result);
mysqli_close($con);
This is my code, but result: false
I tried var_dump to check why I cant print my data.
Is this data print correct for my code?
echo "<h1>People</h1>";
echo "<table border='1'>
<tr>
<th>ID</th>
<th>Name</th>
<th>Lastname</th>
<th>Email</th>
<th>Company</th>
<th>Phone</th>
</tr>";
$result = mysql_query($query) or die(mysql_error());
echo var_dump($result);
while($row = mysql_fetch_array($result)){
echo "<tr>";
echo "<td>" . $row['id_customer'] . "</td>";
echo "<td>" . $row['firstname'] . "</td>";
echo "<td>" . $row['lastname'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<td>" . $row['company'] . "</td>";
echo "<td>" . $row['mobile_phone'] . "</td>";
echo "</tr>";
}