I have two tables with this structure
Table 1 E-mail - User - Login Table 2 Deals - Dealer - Login
I would like to do something similar to Select from table 1 the email get the login and echo table 2 deals & dealer
Now i done this but I know is wrong
$sql = "SELECT Login,Deals,Dealers FROM users AND deals where Email = '$email' ";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
echo " <strong> Balance: </strong> " . $row["Balance"]. " <strong>MT5 Trading Number</strong> " . $row["Login"]. "<br>";
}
} else {
echo "0 results";
}