![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
09/05/2010, 05:56
|
![Avatar de Cameron_2006](http://static.forosdelweb.com/customavatars/avatar162691_1.gif) | | | Fecha de Ingreso: diciembre-2006
Mensajes: 248
Antigüedad: 18 años, 1 mes Puntos: 0 | |
Respuesta: limitar la cantidad de imagenes a subir Buenos días otra vez, seguí investigando y en este mismo foro encontré la solución, como no se como referir al tema escribo la solución nuevamente:
<%'selecciono todos los registro que corresponden a ese anuncio y al usuario correspondiente:
Set rst=Server.CreateObject("ADODB.RecordSet")
sql= "select Count(*) as cod_anuncio from m_fotosinmuebles where cod_anuncio="&cod_anuncio&" and cod_usuario="&cod_usuario&";"
Set rst = Conexion.Execute (SQL)
if rst(0) > 4 then
response.write "Ya su límite de fotos está completo"
Else
%>
<a href="f_agregaimagen.asp?cod_anuncio=<%=cod_anunci o%>&usuario=<%=usuario%>&cod_usuario=<%=cod_usuari o%>">agregar imágenes</a>
<%rst.Close
set rst=nothing
conexion.Close
Set conexion = Nothing
%> |