Comunidad de diseño web y desarrollo en internet online

Loop en asp

Citar            
MensajeEscrito el 18 Feb 2008 08:33 am
Muy buenas...

Estoy montando la web de una inmobiliaria y necesito que me expliquen como hacer un loop de una cosulta de bd...

Es decir...he creado un modulo que se conecta a la bd y carge todos los resultados...en cajas diferente....me entienden?

la caja es esta...

Código :

<table width="426" height="334" border="0" cellpadding="0" cellspacing="1">
        <tr>
          <th width="516" height="117" scope="col"><table width="323" border="0" cellspacing="1" cellpadding="0">
              <tr>
                <th width="152" scope="col"><div align="center"><font color="#00FF99"> <img src="img/fotos/promo/<%=rs("foto1")%>" alt="Click para ampliar" width="150" height="113" border="1" /> </font><font color="#00FF99"> </font></div></th>
                <th width="15" scope="col">&nbsp;</th>
                <th width="152" scope="col"><div align="center"><font color="#00FF99"><img src="img/fotos/promo/<%=rs("foto2")%>" alt="Click para ampliar" width="150" height="113" border="1" /></font></div></th>
              </tr>
          </table></th>
        </tr>
        <tr>
          <td><table width="415" border="0" align="center" cellpadding="1" cellspacing="0" bordercolor="00743d">
              <tr>
                <td width="21%" height="18" nowrap="nowrap" class="textodestacado"><div align="center"><strong>ZONA:</strong></div></td>
                <td colspan="2"><%=rs("zona")%>&nbsp;</td>
                <td width="8%" nowrap="nowrap"><div align="center" class="textodestacado"><strong>Id: </strong></div></td>
                <td width="9%" rowspan="3"><a href="form_inmuebles.asp?id=<%=rs("id")%>"><img src="img/" alt="Click para interesarse por este inmueble" width="33" height="90" border="0" /></a></td>
              </tr>
              <tr>
                <td valign="top"><div align="center" class="textodestacado"><strong>Descripci&oacute;n:</strong></div></td>
                <td colspan="3"><div align="justify"><%=rs("descripcion")%></div></td>
              </tr>
              <tr>
                <td height="18"><div align="center" class="textodestacado"><strong>Precio:</strong></div></td>
                <td colspan="3"><%=rs("precio")%></td>
              </tr>
              <tr> </tr>
          </table></td>
        </tr>
        <tr>
          <td height="106">&nbsp;</td>
        </tr>
      </table>



Grasias a todossss!

Por bui3

71 de clabLevel



Genero:Masculino  

opera
Citar            
MensajeEscrito el 18 Feb 2008 12:44 pm
Donde rs es el recordset donde metes el resultado de tu consulta a la bbdd.


Código :

Do While Not rs.EOF 
---------------Aqui tus sentencias------------
rs.MoveNext
Loop 

Por One

Claber

1488 de clabLevel

5 tutoriales

Genero:Masculino  

Programador Web

firefox
Citar            
MensajeEscrito el 20 Feb 2008 08:07 am
grasiasss lo provaré!

un saludo a la peña de sevilla

Por bui3

71 de clabLevel



Genero:Masculino  

opera

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.