Ver Mensaje Individual
  #7 (permalink)  
Antiguo 15/05/2008, 07:45
zozer2404
 
Fecha de Ingreso: febrero-2007
Mensajes: 13
Antigüedad: 17 años, 3 meses
Puntos: 0
Re: CONECTAR Sql y PHP y mostar los valores en una tabla

hice estas modificaciones, pero aun sigo con errores, no se ya que mas hacer, necesito porner en tabla los resultados que me da, como les dije en el primer tema la conexion numero 1 me conecta pero me muestra los datos hacia a bajo y desordenados.


<?php
$conexion_sqlserver = mssql_connect("200.29.18.66","sa","mzsqlserver");
mssql_select_db("Empresa");
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000">
<table width="100%" border="1" cellspacing="1" bordercolor="#666666">
<tr align="center" background="a.jpg">
<td><font color="#000000">Departamento</font></td>
<td><font color="#000000">Rut</font></td>
<td><font color="#000000">-</font></td>
<td><font color="#000000">Nombre</font></td>
<td><font color="#000000">Apellido</font></td>
<td><font color="#000000">Numero de Control</font></td>
<td><font color="#000000">Mes</font></td>
<td><font color="#000000">año</font></td>
<td><font color="#000000">Tipo</font></td>
<td><font color="#000000">lineas</font></td>
<td><font color="#000000">Total Horas</font></td>
</tr>

<?php
$consulta_sql = mssql_query("Exec Sp_EstadoCtrTiempo '', 5, 2008",$conexion_sqlserver);
while ($registro = mssql_fetch_array($consulta_sql))

do {
?>

<tr>
<td><?php $registro[0]; ?></td>
<td><?php echo $registro[1]; ?></td>
<td><?php echo $registro[2]; ?></td>
<td><?php echo $registro[3]; ?></td>
<td><?php echo $registro[4]; ?></td>
<td><?php echo $registro[5]; ?></td>
<td><?php echo $registro[6]; ?></td>
<td><?php echo $registro[7]; ?></td>
<td><?php echo $registro[8]; ?></td>
<td><?php echo $registro[9]; ?></td>
<td><?php echo $registro[10]; ?></td>
<td><?php echo $registro[11]; ?></td>
</tr>
<?php
}
while ($row_Recordset2 = mysql_fetch_assoc($Recordset2));
?>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset2);
?>