Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can we show data base records in three (3) column?

Status
Not open for further replies.

zahidpervaiz

Programmer
Aug 13, 2003
20
AE
Hello,
How r u? I have one difficulty.I want to show records in
3 column from data base.
how can i do this.?
actually i want to show records in row and column.
but want to show records on conditions.

when i run this code it show all records in one column.
i want to show records in three(3) column
<!--#INCLUDE file=&quot;connection.asp&quot; -->
<%

dim sql
%>
<HTML>
<HEAD><TITLE>Welcome...</TITLE>
</HEAD>
<BODY>

<table border=&quot;0&quot; align=left>

<%
rs.Open &quot;select * from accesseries&quot;,cn
dim a,b,c,d,e,f
while not rs.EOF
a = rs.Fields (&quot;companyname&quot;).Value
b = rs.Fields (&quot;PBox&quot;).Value
c = rs.Fields (&quot;telno&quot;).Value
d = rs.Fields (&quot;faxno&quot;).Value
e = rs.Fields (&quot;email&quot;).Value
f = rs.Fields (&quot;email&quot;).Value

%>
<tr>
<td><h3><font color=&quot;#FFCC33&quot;>
<%response.Write (a)%></font></h3></td></tr>
<tr><td><font color=&quot;black&quot;><h4><b>
<%=b%>
</b></h4></font></td></tr>
<tr><td><font color=&quot;black&quot;>
<%=&quot;P.O.Box: &quot;%><%=c%>
</font></td></tr>
<tr><td><font color=&quot;black&quot;>
<%=&quot;Phone: &quot;%><%=d%>
</font></td></tr>
<tr><td><font color=&quot;black&quot;>
<%=&quot;Fax: &quot;%><%=e%>
</font></td></tr>
<tr><td><font color=&quot;black&quot;>
<%=&quot;E mail: &quot;%><%=f%>
</font></td></tr>

<%rs.MoveNext
wend
%>
</table>

</BODY></HTML>

 
you have six database fields...how do you want to group them in the three columns?

here is how to write an html table:

<table>
<tr>
<td>row 1, col 1</td>
<td>row 1, col 2</td>
</tr>
<tr>
<td>row 2, col 1</td>
<td>row 2, col 2</td>
</tr>
</table>

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
Dear,You can't understand my Question I want to show records
in ist row just 4 records.5th records must show in 2nd column.
as it is 4 records in 2nd column.and 9th record must show in 3rd
column. and so on..........
Please help me in this matter.
 
a bit more clear...

Known is handfull, Unknown is worldfull
 
actually jemminger is pretty much correct. This is a formatting issue. The only addition it sounds like you need is incrementation to adjust where you start your new cells.
eg:
x = x + 1
each increment and If x = 5 then .write &quot;</td><td>&quot;

_____________________________________________________________________
You can accomplish anything in life, provided that you do not mind who gets credit.
Harry S. Truman

onpnt2.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top