Ver Mensaje Individual
  #3 (permalink)  
Antiguo 14/05/2008, 17:01
Avatar de trasgukabi
trasgukabi
 
Fecha de Ingreso: septiembre-2004
Mensajes: 2.749
Antigüedad: 19 años, 8 meses
Puntos: 18
Re: CONECTAR Sql y PHP y mostar los valores en una tabla

Código PHP:
<?php
$conexion_sqlserver 
mssql_connect("servidor","nombreusuario","passw");
mssql_select_db("base de dato");
$consulta_sql mssql_query("Exec Sp_EstadoCtrTiempo '', 5, 2008",$conexion_sqlserver);

?>

<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 do { ?>
<tr>
<td><?php echo $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 ($registromysql_fetch_assoc($consulta_sql)); ?>
</table>
</body>
</html>
<?php
mysql_free_result
($registro);
?>
deja ya el dreamweaver...