hola amigos tengo un problema, no lista la primera fila, cuando jalo los datos con un select de la base de datos
lista todo normal, pero la primera fila no sale, sale a partir de la 2da
xq sera ? si tienen un metodo mejor ponganlo amigos.
gracias x todo
Código HTML:
<form action="procesos php/insertar_tiempo.php" method="post">
<table width="600" border="1" align="center">
<tr>
<td width="102">ID</td>
<td width="174">Nombres</td>
<td width="62">Tiempo</td>
<td width="92">Fecha</td>
<td width="68"> </td>
<td width="62"> </td>
</tr>
<?php
include('procesos php/listatiempos.php');
while ($row = mysql_fetch_array($resultado))
{
?>
<tr>
<td><?php echo $row['usu_id']; ?></td>
<td><?php echo $row['nombres']; ?></td>
<td><?php echo $row['tiempo']; ?></td>
<td><?php echo $row['tie_fecha']; ?></td>
<td><input type="submit" name="button" id="button" value="Modificar" /></td>
<td><input type="submit" name="button2" id="button2" value="Eliminar" /></td>
</tr>
<?php } ?>
</table>
</form>
Código PHP:
<?php
//Haciendo una conexion, y revisandola
mysql_connect('localhost','root','123456')or die ('Ha fallado la conexión: '.mysql_error());
mysql_select_db('sistemaweb')or die ('Error al seleccionar la Base de Datos: '.mysql_error());
$resultado =@mysql_query("SELECT u.usu_id, CONCAT (p.per_nombres, ' ', p.per_apellidos) as nombres ,Concat ( t.tie_cantidad, ' minutos') as tiempo , t.tie_fecha
FROM persona p
INNER JOIN usuario u USING (per_codigo)
INNER JOIN tiempo t USING (usu_codigo);")or die ('error en la query: '.mysql_error());
$registros=mysql_fetch_array($resultado);
$usu_id=$registros[usu_id];
$nombres=$registros[nombres];
$tiempo=$registros[tiempo];
$tie_fecha=$registros[tie_fecha];
//echo(" tu id: ".$usu_id);
//echo(" tus nombres: ".$nombres);
//echo(" tu tiempo: ".$tiempo);
//echo(" fecha: ".$tie_fecha);
?>