Web Analytics Made Easy -
StatCounter displaying records from a db in rows of four - CodingForum

Announcement

Collapse
No announcement yet.

displaying records from a db in rows of four

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • displaying records from a db in rows of four

    hello, I am display records from a database to show images that go 4 in a row, then if there are more than four records they dropdown to make another four below and so on.. like

    0 0 0 0
    0 0 0 0
    0 0 0 0


    but when i can't work out how, I have done my code to display records but they end up coming out like..

    0 0 0 0 0 0 0 0 0 0 0


    here is the code I am using.. any help would be good thanks


    If Not rs.EOF Then
    While Not rs.EOF
    %>

    <IMG width="40" height="40" src="=<%=rs("ID")%>'" <a>

    <%rs.MoveNext
    Wend
    Else
    Response.Write "No Record Found"
    End If
    <marquee>thanks</marquee>

  • #2
    Add a counter

    set counter to zero

    <img <%%>>

    <%
    counter = counter + 1
    if counter equals 4 then
    -reset the counter to zero
    -insert a page break

    %>

    that should get you started

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

    Comment

    Working...
    X