After guidance from laruence, I have made all-round changes, and I have limited ability to do the following:
ASP/Visual BasicCode Copy codeThe Code is as follows: <%
Const P = 6' 2 entries per page
Set rs = server. Createobject ("ADODB. recordset ")
SQL = "select * from show order by ID DESC"
Rs. Open SQL, Conn, 1
I = 0
Do while not Rs. EOF
%> <TD align = "center" Height = "98">
<A href = "show. asp? Id = <% = RS ("ID") %> ">
"/> </a>
</TD>
<%
If (I + 1) mod 3 = 0 then
Response. Write "</tr>"
If I <(p-1) Then response. Write "<tr>"
End if
I = I + 1
If I> P then exit do
Rs. movenext
Loop
If I mod 3 <> 0 then
For M = 3-(I mod 3) to 1 step-1
Response. Write "<TD> </TD>"
Next
Response. Write "</tr>"
End if
If I = 3 then
Response. Write "<TD> </tr>"
End if
Rs. Close
Set rs = nothing
%>
The previous Code has not been changed.
Copy code The Code is as follows: <%
Const P = 6' 2 entries per page
Set rs = server. Createobject ("ADODB. recordset ")
SQL = "select * from show order by ID DESC"
Rs. Open SQL, Conn, 1
I = 1
Do while not Rs. EOF
%> <TD align = "center" Height = "98">
<A href = "show. asp? Id = <% = RS ("ID") %> ">
"/> </a>
</TD>
<%
If I mod 3 = 0 then
Response. Write ("</tr> <tr> ")
End if
I = I + 1
If I> P then exit do
Rs. movenext
Loop
Rs. Close
Set rs = nothing
%>