Print Page | Close Window

Formatting columns from a database

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=9319
Printed Date: 28 March 2026 at 9:08am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Formatting columns from a database
Posted By: KCWebMonkey
Subject: Formatting columns from a database
Date Posted: 28 January 2004 at 9:42am

I have page where I am displaying data from a database, and I want to format it into two columns. I know that I can do this with:

 

If intCount Mod 2 = 1 Then

 

...but that displays data like this:

a

b

c

d

e

f

g

h

i




Replies:
Posted By: Phat
Date Posted: 28 January 2004 at 9:45am
Maybe use a order by on a field in the database.


Posted By: KCWebMonkey
Date Posted: 28 January 2004 at 10:08am
How would ORDER BY help?


Posted By: pmormr
Date Posted: 28 January 2004 at 7:17pm
can you post the rest of your code? you probably just need to mix the code in some different places to get it right

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: michael
Date Posted: 28 January 2004 at 9:53pm
In asp that will be a pain in the but. Prob. have to use a cursor, to go display dataset 1 then 1+5 then 2 then 2+5 etc. Use asp.net and it's all good using a datalist or so.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: TYSON
Date Posted: 29 January 2004 at 6:46am

I stumbled across this a while ago looking for something similiar

http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=178 - http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=178

Scroll down to the second example and that should suit your requirements.



-------------
http://www.fuo-motorsports.com/ - http://www.fuo-motorsports.com/


Posted By: KCWebMonkey
Date Posted: 29 January 2004 at 11:17am
Thanks tyson, will try that



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net