Web Wiz - Solar Powered Eco Web Hosting

  New Posts New Posts RSS Feed - Formatting columns from a database
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Formatting columns from a database

 Post Reply Post Reply
Author
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Topic: Formatting columns from a database
    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

Back to Top
Phat View Drop Down
Senior Member
Senior Member


Joined: 23 February 2003
Status: Offline
Points: 386
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phat Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2004 at 9:45am
Maybe use a order by on a field in the database.
Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2004 at 10:08am
How would ORDER BY help?
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4671
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
TYSON View Drop Down
Groupie
Groupie


Joined: 18 August 2002
Location: Australia
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote TYSON Quote  Post ReplyReply Direct Link To This Post 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

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

Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2004 at 11:17am
Thanks tyson, will try that
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.07
Copyright ©2001-2024 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Policy

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2024 Web Wiz Ltd. All rights reserved.