Ver Mensaje Individual
  #4 (permalink)  
Antiguo 01/12/2008, 07:55
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 18 años, 7 meses
Puntos: 126
Respuesta: mostrar sólo una imagen de una registro

Hola

¿Te a quedado tal que así?

Código asp:
Ver original
  1. <%
  2. inmueble=rs7("id_inmueble")
  3.  
  4.  
  5. ssql = "select filename, nombre, (SELECT MIN(a.id) FROM fotos_inmuebles a WHERE a.id_inmueble=fotos_inmuebles.id_inmueble) from fotos_inmuebles where id_inmueble ="&inmueble
  6. set mima=conn.Execute(ssql)
  7.  
  8. if mima.eof and mima.bof then%>
  9.  
  10. <td width="100"><% response.write ("<img src='../../imagenes/FOTO-NO-DISPONIBLE.jpg' alt='no disponible' />")%></td>
  11.  
  12.  
  13. <%
  14. else
  15. %>
  16.  
  17. <td width="100">
  18. <a href="javascript:;" onclick="MM_openBrWindow('Imagen.asp?imagID=<%=mim a( "filename" )%>');">
  19. <img src="../fotos_inmuebles/<%=mima( "filename" )%>" height="100" width="100" border="0"></a><br />
  20. </td>
  21. </tr>
  22. <br />
  23.  
  24. <%
  25. end if
  26. mima.Close
  27. set mima=nothing
  28.  
  29. rs7.MoveNext
  30. loop
  31. rs7.Close
  32. end if
  33. set rs7 = nothing
  34. %>

Suerte
__________________
Los formularios se envían/validan con un botón Submit
<input type="submit" value="Enviar" style="background-color:#0B5795; font:bold 10px verdana; color:#FFF;" />