Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/09/2011, 15:09
deivisvb28
 
Fecha de Ingreso: septiembre-2011
Mensajes: 4
Antigüedad: 12 años, 7 meses
Puntos: 1
Respuesta: Problema con php y mysql al generar tabla

Prueba esta parte y me comenta.

$sql = "SELECT * FROM pacientes ORDER BY Nombre_Paciente";
$result = mysql_query($sql) or die(header("Location: Login.php?error=2"));
//$row = mysql_fetch_array($result);

while ($row = mysql_fetch_assoc($result))
{
echo '<tr class="data_table_content"><td width="40px">' . $row["id_Paciente"] . '</td>';
echo '<td width="300px">' . $row["Nombre_Paciente"] . '</td>';
echo '<td width="40px">' . $row["Edad"] . '</td>';
echo '<td width="300px">' . $row["Lugar"] . '</td>';
echo '<td width="20px" class="data_table_content_2"><a href="patient_look.php?id_paciente=' . $row["id_Paciente"] . '"><img src="Images/historial.png" title="Ver Detalles" height="18px" width="18px"/></a></td>';
echo '<td width="20px" class="data_table_content_2"><a href="patient_modify.php?id_paciente=' . $row["id_Paciente"] . '"><img src="Images/pencil.png" title="Modificar" height="18px" width="18px"/></a></td>';
echo '<td width="20px" class="data_table_content_2"><a href="patient_delete.php?id_paciente=' . $row["id_Paciente"] . '" onclick="return confirm(String.fromCharCode(191)+\'Realmente desea eliminar al paciente?\')"><img src="Images/bad.png" title="Eliminar" height="16px" width="16px" style="margin:0px 4px;"/></a></td></tr>';
}