Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - SQL HELP - SELECT STATEMENT
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SQL HELP - SELECT STATEMENT

 Post Reply Post Reply Page  <1 2345>
Author
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 10:05pm

I'm a complete newb to this so I have no idea what that means to do ... it just confused me more?

Can you explain it a little better please?

And yes, you were exactly right.  They key thing is I need to display "teamname" on specific table rows for each round.

Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 10:11pm

I'm sure I have to do something to that piece of code but I put that into my page, as is and I still get an out of range error?

Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2003 at 5:41am
The code above assumes that you have all five recordsets stored into arrays, so you will need those arrays. Second, it assumes that there are at least one row in each of the arrays.

The for statement creates a loop that will loop through each row in the first array (arrRound1). The mod function provides you with the remainder from dividing 2 numbers. 4 mod 3 is 1. 2 mod 2 is 0. 10 mod 3 is 1. You only want to display arrRound2 once for every 2 arrRound1, when i mod 2 = 0 arrRound2 will be displayed. Because the array rows in arrRound2 are half the value of the corresponding rows in arrRound1 you divide i by 2. Because there is no remainder i/2 should be a whole number, so the CLng isn't really needed, but I added it anyway to insure that you have an integer. The above then follows for each additional array with every array having exactly half the records of the previous one thus the you go from 2 to 4 to 8 to 16.
Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2003 at 8:52am

The problem with that is possible that their is not ALWAYS going to be exactly half of what is in the previous array.

Reason being, a team may progress to the next bracket faster then another.  Which means their could only be 1 team in the round 2 (arrRound2) for awhile.

Get it?

Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2003 at 9:53am
Then you will need to check to see that there is a row available and then check to see if the team listed in the row goes along with the team in the pairing.
Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2003 at 11:04am
how do i check to see if their is a row?
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2003 at 11:09am
If you have an array then it must have a least one row. You can not use the GetRow method when there are no rows to retrieve.
Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2003 at 12:41pm

... ok so use a normal array method

I tried that originally but kept getting a type mismatch, I guess i'll retry it

I appreciate the help!

I hope to getting it working soon! :)

Back to Top
 Post Reply Post Reply Page  <1 2345>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 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 Notice

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 at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

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