Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Screws Loose

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
Carefree Posted - 01 July 2025 : 12:36:11
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

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07