petrod
04-08-2004, 01:01 AM
I have this code:
This code can give the names of all rows in the database.But i have managed to put the headings of the tables as i want.
%>
Dim intRec
objRS.PageSize = 5
objRS.CacheSize = 5
objRS.CursorLocation = adUseClient
<TABLE BORDER = 1>
<TR>
<TH>Code</TH>
<TH>Name</TH>
<TH>ADRESS</TH?
</TR>
<%
For intRec=1 To objRS.PageSize
If Not objRS.EOF Then
Response.Write "<tr>"
For Each fldF in objRS.Fields
Response.Write "<td>" & fldF.Value & "</td>"
Next
objRS.MoveNext
End If
Next
Response.Write "</tbody></table><p>"
This code puts the heading i want, but it gives me all the rows from the database. I want to have only 3 rowsn show the one that i will choose as the headings.I want after the for to be able to put my own rows,to choose what rows to put i from the code and not the user.
Tto put my own rows from the databse like the below.How can i merge those two together.
%> <TR>
<TD><%=objRS.Fields("title").Value%></TD>
<TD><%=objRS.Fields("capcity").Value%></TD>
<TD><%=objRS.Fields("airline").Value%></TD>
</TR><%
This code can give the names of all rows in the database.But i have managed to put the headings of the tables as i want.
%>
Dim intRec
objRS.PageSize = 5
objRS.CacheSize = 5
objRS.CursorLocation = adUseClient
<TABLE BORDER = 1>
<TR>
<TH>Code</TH>
<TH>Name</TH>
<TH>ADRESS</TH?
</TR>
<%
For intRec=1 To objRS.PageSize
If Not objRS.EOF Then
Response.Write "<tr>"
For Each fldF in objRS.Fields
Response.Write "<td>" & fldF.Value & "</td>"
Next
objRS.MoveNext
End If
Next
Response.Write "</tbody></table><p>"
This code puts the heading i want, but it gives me all the rows from the database. I want to have only 3 rowsn show the one that i will choose as the headings.I want after the for to be able to put my own rows,to choose what rows to put i from the code and not the user.
Tto put my own rows from the databse like the below.How can i merge those two together.
%> <TR>
<TD><%=objRS.Fields("title").Value%></TD>
<TD><%=objRS.Fields("capcity").Value%></TD>
<TD><%=objRS.Fields("airline").Value%></TD>
</TR><%