Ver Mensaje Individual
  #9 (permalink)  
Antiguo 08/02/2007, 11:29
carolina
 
Fecha de Ingreso: enero-2007
Mensajes: 158
Antigüedad: 18 años, 1 mes
Puntos: 0
Re: mostrar filas y columnas de la BD personalizadas

Despues de una semana por fin lo pude hacer :

Ejemplo de los checkbox: <input name="no" type="checkbox" value="3">

(Si se seleccionan los checkbox se mustra la columna correspondiente)

Cita:
<table width="891" border="1">
<caption align="left">
DATOS PERSONALES
<% SQLtxt = "Select nombre, nombre2, apellido1, apellido2, rut, f_nacimiento, direccion, telefono, celular FROM trabajador"
Set Consulta = oConn.Execute(SQLtxt)%>

</caption>
<tr>
<% if(1=Request.Form("ru"))Then%> <th width="98" scope="col"> Rut </th><%end if%>
<% if(3=Request.Form("no"))Then%><th width="111" scope="col">Apellido </th><%end if%>
<% if(2=Request.Form("ap"))Then%><th width="139" scope="col">nombres</th><%end if%>
<% if(4=Request.Form("na"))Then%><th width="80" scope="col">Fecha Nacimiento </th><%end if%>
<% if(5=Request.Form("di"))Then%><th width="234" scope="col">Direccion</th><%end if%>
<% if(7=Request.Form("te"))Then%><th width="87" scope="col">Telefono</th><%end if%>
<% if(6=Request.Form("ce"))Then%><th width="96" scope="col">Celular</th><%end if%>
</tr>
<% Do While NOT Consulta.EOF%>
<tr>
<% if(1=Request.Form("ru"))Then%><td> <%=Consulta("rut")%></td><%end if%>
<% if(3=Request.Form("no"))Then%><td> <%=Consulta("nombre")%>&nbsp;<% =Consulta("nombre2")%></td><%end if%>
<% if(2=Request.Form("ap"))Then%><td> <%=Consulta("apellido1")%>&nbsp;<% =Consulta("apellido2")%></td><%end if%>
<% if(4=Request.Form("na"))Then%><td> <% = Consulta("f_nacimiento")%></td><%end if%>
<% if(5=Request.Form("di"))Then%><td> <% = Consulta("direccion")%></td><%end if%>
<% if(7=Request.Form("te"))Then%><td> <% = Consulta("telefono")%></td><%end if%>
<% if(6=Request.Form("ce"))Then%><td> <% = Consulta("celular")%></td><%end if%>
</tr>
<% Consulta.MoveNext
Loop
Consulta.Close%>
</table>