I am creating a table with data extracted from my MySql database with php but when I want to start showing the data it marks me errors like:
Warning: mysqli_query (): Empty query in C: \ xampp \ htdocs \ Safety \ table.php on line 29
Warning: mysqli_fetch_row () expects parameter 1 to be mysqli_result, boolean given in C: \ xampp \ htdocs \ Safety \ table.php on line 30
I have already reviewed PHP manuals and forums but I can not make it work, I have little time with PHP I hope you can help me, this is my code:
<?php
include('conexion.php');
$con = mysqli_connect("localhost","root","")or die("Problemas al conectar");
mysqli_select_db($con,"safety") or die("Problemas con la Base Datos");
//Se crea una tabla para mostrar los resultados
?>
<div class="row">
<div class="col-sm-12">
<h2>Tabla Reporte</h2>
<table class="table table-hover table-condensed table-bordered">
<caption>
<button class="btn btn-primary">Agregar
<span class="glyphicon glyphicon-plus"></span>
</button>
</caption>
<tr>
<td>NOMINA</td>
<td>NOMBRE</td>
<td>COMENTARIO</td>
</tr>
<?php
$sql = mysqli_query($con, "SELECT nomina,nombre,comentario FROM empleado,comentarios");
$resultado=mysqli_query($con,$sql);
while($ver=mysqli_fetch_row($resultado)){
?>
<tr>
<td><?php echo $ver[1] ?></td>
<td></td>
<td></td>
</tr>
<?php
}
//Cerrar la conexión
mysqli_close($con);
?>
</table>
</div>
</div>