I want to show data from two tables from the same database on the same PHP page.
One table is called "departures" and the other is called "dpartidos2".
Now, I want to show a data that is called "match3" that is in "split2"
My code:
$sql="SELECT * from dpartidos ";
$result=mysqli_query($conexion,$sql);
while($mostrar=mysqli_fetch_array($result)){
if ($quediaes=="Wed" && 0 <= $hora && $hora <= 10) {
echo '<h3>No hay ningun partido en este momento</h3>';
}
else if ($quediaes=="Wed" && 11 <= $hora && $hora <= 12) {
echo '<h3>Estás mirando: ' . $mostrar['partido1'] . '</h3>';
}
else if ($quediaes=="Wed" && 13 <= $hora && $hora <= 14) {
echo '<h3>A continuacion: ' . $mostrar['partido3'] . '</h3>';
}
else if ($quediaes=="Wed" && 15 <= $hora && $hora <= 17 ) {
echo '<h3>Estás mirando: ' . $mostrar['partido3'] . '</h3>';
}
else if ($quediaes=="Wed" && 16 <= $hora && $hora <= 23) {
echo '<h3>No hay ningun partido en este momento</h3>';
}
}