The static one looks like this:
www.thestoryworks.com/publishing/comics/collecting/wants63.htm
which is the look I'm trying to replicate in a dynamic version.
My dynamic one currently looks like this:
www.tmcreative.co.uk/db/buildtable01_orig.asp
As you can see, it is starting a new line for each issue, rather than rendering a year of Spider-Man issues on a single line.
The code looks like this:
Expand|Select|Wrap|Line Numbers
- <%
- Option Explicit
- Dim strConnect
- %>
- <!-- #include file="admin/connect_local.asp" -->
- <!-- METADATA TYPE="typelib"
- FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->
- <HTML>
- <HEAD>
- <title>TheStoryWorks.com :: Comics :: Collecting :: Marvel 1963</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </pre></HEAD>
- <BODY>
- <%
- Dim objCommand, objRS, varCounter, varMonthCount, varMonthCount10, varLoop, num
- Set objCommand = Server.CreateObject("ADODB.Command")
- objCommand.ActiveConnection = strConnect
- objCommand.CommandText = "SELECT Title.titleName, Item.issue, Item.month, Item.year, Item.have " & _
- "FROM Title INNER JOIN Item ON Title.idTitle = Item.idTitle " & _
- "WHERE (Item.year LIKE '63') ORDER BY titleName,month;"
- objCommand.CommandType = adCmdText
- Set objRS = objCommand.Execute
- Set objCommand = Nothing
- varMonthCount = 1
- varMonthCount10 = 10
- Response.Write "<table width='100%' border='0' cellspacing='0' cellpadding='2'>"
- Response.Write "<tr bgcolor='cccccc'><td class='bold'>Date Published</td>"
- For varCounter = 1 to 9
- Response.Write "<td class='bold'>0" & varMonthCount & "/" & objRS("year") & "</td>"
- varMonthCount = varMonthCount + 1
- Next
- For varCounter = 10 to 12
- Response.Write "<td class='bold'>" & varMonthCount10 & "/" & objRS("year") & "</td>"
- varMonthCount10 = varMonthCount10 + 1
- Next
- Response.Write "<tr>"
- For varCounter = 1 to 13
- Response.Write "<td> </td>"
- Next
- Response.Write "</tr>"
- Response.Write "<tr>"
- ' RENDER BODY OF TABLE
- num = 0
- While Not objRS.EOF
- Response.Write "<tr><td class='bold'"
- ' WE WANT ALTERNATING ROWS, GREY AND WHITE, SO WE USE THE
- ' NUM VARIABLE TO TELL US WHAT COLOUR TO MAKE EACH TABLE ROW...
- if num mod 2 = 0 then Response.Write " bgcolor=#ffffff" Else Response.Write " bgcolor=#cccccc"
- if num <> 0 then
- end if
- Response.Write ">" & objRS("titleName") & "</td>"
- ' BEGIN TO RENDER THE ISSUE NUMBERS
- varloop = 1
- For varloop = 1 to 12
- Response.Write "<td align='center'"
- ' CHOOSE ROW COLOUR FOR ISSUE MUMBERS
- if num mod 2 = 0 then Response.Write " bgcolor=#ffffff" Else Response.Write " bgcolor=#cccccc"
- if num <> 0 then
- end if
- ' IF I HAVE THE ISSUE, RENDER IT IN BOLD
- If objRS("have") = True Then Response.Write " class='bold'>" Else Response.Write ">" End If
- ' RENDER THE ISSUE NUMBER
- If objRS("month") = varLoop then Response.Write objRS("issue") else Response.Write "-" end if
- Response.Write "</td>"
- ' LOOP TO THE NEXT ISSUE
- 'objRS.MoveNext
- Next
- ' MOVE TO THE NEXT TITLE AND LOOP AGAIN
- Response.Write "</tr>"
- objRS.MoveNext
- num = num + 1
- wEnd
- objRS.Close
- Set objRS = Nothing
- %>
- </table>
- </BODY>
- </HTML>
So I tried this:
Expand|Select|Wrap|Line Numbers
- ' RENDER THE ISSUE NUMBER
- If objRS("month") = varLoop _
- then Response.Write objRS("issue")
- objRS.MoveNext
- else Response.Write "-"
- end if
- Response.Write "</td>"
I can't figure what I'm doing wrong ... thought it's probably screamingly obvious to the proper ASP coders on this forum.
Anyone have any ideas?
Peck2000
London