I'm doing an inner join of 3 tables and it does not work ... with 2 tables it's all good .. when I add the third table it does not show me anything.
<?php
try{
require_once('include/funciones/db_conexion.php');
$sql = "SELECT 'evento_id', 'nombre_evento', 'fecha_evento', 'hora_evento', 'nombre_invitado'";
$sql .= "FROM 'eventos'";
$sql .= "INNER JOIN 'categoria_evento'";
$sql .= "ON eventos.id_cat_evento=categoria_evento.id_categoria";
$sql .= "INNER JOIN 'invitados'";
$sql .= "ON eventos.id_inv=invitados.invitado_id";
$resultado = $conn->query($sql);
} catch (Exception $e) {
$error = $e->getMessage();
}
?>
<?php while($eventos = $resultado->fetch_all(MYSQLI_ASSOC) ){
?>
<pre>
<?php var_dump($eventos); ?>
</pre>
<?php } ?>