Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Screws Loose
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4214 Posts

Posted - 01 July 2025 :  12:36:11  Show Profile  Reply with Quote
Here's a bit of code from another project. The bit from (While) to (Wend) causes the page to stop responding but dratted if I can figure out why. What it's SUPPOSED to do there is check whether the new images belong to the previous listing ID and, if so, skip them until a new listing ID shows up.


strSqlQ = "SELECT L.PHOTO_URL, L.LISTING_ID, L.TOPIC_ID, T.T_STATUS, T.T_SUBJECT FROM LISTING_PHOTOS L, " & strTablePrefix & "TOPICS T WHERE ((T.T_STATUS=1) AND (T.TOPIC_ID=L.TOPIC_ID)) ORDER BY LISTING_ID DESC, PHOTO_PRIORITY ASC"
Set rsDisplay = Server.CreateObject("ADODB.Recordset")
rsDisplay.cachesize = 20
rsDisplay.Open strSqlQ, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
iDisplayData = rsDisplay.GetRows(20)
iDisplayCount = UBound(iDisplayData, 2)
inti = 0
dPhoto_URL = 0
dListing_ID = 1
dTopic_ID = 2
dT_Status = 3
dT_Subject = 4
iDisplay = 0
For AB = 0 To 1
If intRows < 10 Then
Response.Write " <tr height=""275"" valign=""bottom"">" & vbNewLine
For ik = 1 To 2
Response.Write " <td width=""50%"" align=""center"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><b>" & vbNewLine & _
"<a href=""" & iDisplayData(dPhoto_URL, iDisplay) & """ target=""_blank"" style=""text_decoration:none;""><img src=""" & iDisplayData(dPhoto_URL, iDisplay) & """ height=""250"" /></a><br />" & vbNewLine & _
"<a title=""See topic"" href=""topic.asp?TOPIC_ID="& iDisplayData(dTopic_ID, iDisplay) & """ target=""_blank"">" & iDisplayData(dT_Subject, iDisplay) & "</a>" & vbNewLine & _
"</b></font></td>" & vbNewLine
LastID = iDisplayData(dTopic_ID, iDisplay)
iDisplay = iDisplay + 1
While iDisplayData(dTopic_ID, iDisplay) = LastID
iDisplay = iDisplay + 1
Wend
If iDisplay > iDisplayCount Then Exit For
Next
Response.Write " </tr>" & vbNewLine
intRows = intRows + 1
If intRows > 10 Then Exit For
End If
Next
rsDisplay.Close
Set rsDisplay = Nothing
Response.Write " </table>" & vbNewLine
WriteFooter
Response.End
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000 Version 3.4.07