Ver Mensaje Individual
  #5 (permalink)  
Antiguo 06/11/2011, 16:04
Qualito
 
Fecha de Ingreso: febrero-2006
Mensajes: 104
Antigüedad: 19 años, 1 mes
Puntos: 0
Respuesta: Problema con buscador PHP que muestra resultados en tabla

Hola

Muchas gracias por sus post, La necesidad te obliga buscar rápido y con sus recomendaciones y la ayuda de este video http://www.youtube.com/watch?v=hWlFFUUT4kw
Logré finalmente dejarlo así

......
// Imprimimos los resultados
if ($row = mysql_fetch_array($result)){
echo "Resultados para: <b>$buscar</b>";

echo "<table width=\"1024\" border=\"1\">";
echo "<tr><th width=\"150\">Usuario</th><th width=\"200\">Cargo</th><th width=\"200\">Área</th><th width=\"120\">Proyecto / Planta</th>";
echo "<th width=\"80\">Claro</th>";
echo "<th width=\"80\">Movistar</th><th width=\"80\">RPM</th><th width=\"80\">Nextel</th><th width=\"50\">Anexo</th>";
echo "</tr>";
echo "</table>";


do {
?>
<table width="1024" border=1>
<tr>
<td width="150">
<p><b><?=$row['USUARIO'];?></b></p>
</td>
<td width="200">
<p><b><?=$row['CARGO'];?></b></p>
</td>
<td width="200">
<p><b><?=$row['AREA'];?></b></p>
</td>
<td width="120">
<p><b><?=$row['PLANTA'];?></b></p>
</td>
<td width="80">
<p><b><?=$row['CLARO'];?></b></p>
</td>
<td width="80">
<p><b><?=$row['MOVISTAR'];?></b></p>
</td>
<td width="80">
<p><b><?=$row['RPM'];?></b></p>
</td>
<td width="80">
<p><b><?=$row['NEXTEL'];?></b></p>
</td>
<td width="50">
<p><b><?=$row['ANEXO'];?></b></p>
</td>

</tr>
</table>
<?
} while ($row = mysql_fetch_array($result));
echo "<p>Resultados: $total</p>";
} else {
// En caso de no encontrar resultados
echo "No se encontraron resultados para: <b>$buscar</b>";


Ahora ya no repite las cabeceras y funciona ok.
Gracias
Un saludo
Qualito