Hello I'm trying to show a list which showed me with 'myslqi' now I'm working with PDO but I can not make it work the error that generates me I do not understand it.
function listadoUsuarios(){
$db = new BaseDatos();
$db->conectar();
$sentencia = "SELECT * FROM Usuario";
$db->prepare($sentencia);
$sentencia->execute();
echo "<div id='listado'>";
echo "<table id='listadoUsuario' border=1 cellspacing=0>";
echo "<tr>";
echo "<th>".'Nombre completo'."</th>";
echo "<th>".'Correo'."</th>";
echo "<th>".'Teléfono'."</th>";
echo "<th>".'Dirección'."</th>";
echo "<th>".'Fecha de nacimiento'."</th>";
echo "</tr>";
while ($row = $sentencia->fetch(PDO::FETCH_ASSOC)){
echo "<tr>";
echo "<td>".$row['nombre'].', '.$row['apellido']."</td>";
echo "<td>".$row['email']."</td>";
echo "<td>".$row['telefono']."</td>";
echo "<td>".$row['direccion'].', '.$row['cod_postal']."</td>";
echo "<td>".$row['fecha_nac'].' - '."</td>";
echo "<td><button class='btn_tabla'><a href='google.es'>Modificar</a></button></td>";
echo "<td><button class='btn_tabla_mal'><a href='google.es'>Eliminar</a></button></td>";
echo "</tr>";
}
echo "</table>";
echo "</div>";
}