Crash1hd
08-16-2003, 05:49 AM
I was wondering how would I reright the following code so that it would only show the first instance acording to the url
<td width="90%" Class=Center>
<%do Until GBRS.Eof%>
<%If GBRS.Fields("MphotoID") = request.querystring("MphotoID") Then%>
<img src="Pictures/<%response.write GBRS.fields("pictURL")%>" border="0" name="bigPhoto" height="361">
<%End if%>
<%GBRS.movenext%><%loop%>
</td>
in the url is MphotoID=1 in one url and the other is MphotoID=2
and in the database has a field called MphotoID and in there each line of info has a different number some are 1 and some are 2 and it works great for this code
<%do until GRS.EOF%>
<%If GRS.Fields("MphotoID") = request.querystring("MphotoID") Then%>
document.write("<a onmouseover='window.status=\"Click to view image\"; return true' onmouseout='window.status=\"\"; return true' href='javascript: showupdate(<%response.write GRS.fields("ID")%>)'><img src='http://www.alwaysremember.ca/Memorials/Pictures/<%response.write GRS.fields("pictURL")%>' height='80' width='<%response.write (GRS.fields("PicWidth")/(GRS.fields("PicHeight")/80))%>' border='0'></a> ")
<%End if%>
<%GRS.movenext%>
<%loop%>
as I need it to show all but the first code I only want it to show the first instance of that number
and yes its inside of a script thats just the part of the code needed to explain the problem! :)
<td width="90%" Class=Center>
<%do Until GBRS.Eof%>
<%If GBRS.Fields("MphotoID") = request.querystring("MphotoID") Then%>
<img src="Pictures/<%response.write GBRS.fields("pictURL")%>" border="0" name="bigPhoto" height="361">
<%End if%>
<%GBRS.movenext%><%loop%>
</td>
in the url is MphotoID=1 in one url and the other is MphotoID=2
and in the database has a field called MphotoID and in there each line of info has a different number some are 1 and some are 2 and it works great for this code
<%do until GRS.EOF%>
<%If GRS.Fields("MphotoID") = request.querystring("MphotoID") Then%>
document.write("<a onmouseover='window.status=\"Click to view image\"; return true' onmouseout='window.status=\"\"; return true' href='javascript: showupdate(<%response.write GRS.fields("ID")%>)'><img src='http://www.alwaysremember.ca/Memorials/Pictures/<%response.write GRS.fields("pictURL")%>' height='80' width='<%response.write (GRS.fields("PicWidth")/(GRS.fields("PicHeight")/80))%>' border='0'></a> ")
<%End if%>
<%GRS.movenext%>
<%loop%>
as I need it to show all but the first code I only want it to show the first instance of that number
and yes its inside of a script thats just the part of the code needed to explain the problem! :)