Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Anyone got any ideas?*
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Anyone got any ideas?*

 Post Reply Post Reply
Author
flapper View Drop Down
Newbie
Newbie
Avatar

Joined: 27 January 2003
Location: England
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote flapper Quote  Post ReplyReply Direct Link To This Post Topic: Anyone got any ideas?*
    Posted: 19 March 2003 at 5:18am

Ok, on my site i  have a part where you enter you goalscorers for a particular fixture, it looks up the teams and the playersassigned to each... However i can only get it to work using this code:

<li>Leave the textbox blank for players that didnt score</li>
<li>The number of goals entered must equal the score of that fixture</li>
<ul>
<table border='1' align='center'>
 <tr>
  <th colspan='2'><%=strHome%></th>
  <th colspan='2'><%=strAway%></th>
 </tr>
 <tr>
  <th>Player name</th>
  <th>Goals</th>
  <th>Player name</th>
  <th>Goals</th>
 </tr>
<%
set rsPlayer1 = Server.CreateObject("ADODB.Recordset")
set rsPlayer2 = Server.CreateObject("ADODB.Recordset")
rsPlayer1.Open "SELECT * FROM player WHERE club_name='" & strHome & "' ORDER BY last_name", conn, 3, 1
rsPlayer2.Open "SELECT * FROM player WHERE club_name='" & strAway & "' ORDER BY last_name", conn, 3, 1
rsPlayer1.MoveFirst
rsPlayer2.MoveFirst
do until rsPlayer1.EOF
 response.write "<tr>"
 response.write "<td>" & rsPlayer1("first_name") & " " & rsPlayer1("last_name") & "</td>"
 response.write "<td><input type='text' size='3' name='" & rsPlayer1("player_id") & "' /></td>"
 response.write "<td>" & rsPlayer2("first_name") & " " & rsPlayer2("last_name") & "</td>"
 response.write "<td><input type='text' size='3' name='" & rsPlayer2("player_id") & "' /></td>"
 rsplayer1.MoveNext
 rsplayer2.MoveNext
Loop
rsPlayer1.close
rsPlayer2.close
%>
 </tr>
 <tr>
  <td colspan='6' align='center'>
   <input type='submit' value='Update' />
  </td>
 </tr>
</table>

 

--------

The problem is say the "away" team has 17 squad players & the home team has 15 squad player to pick from, the extra "2" squad players are not showing up any ideas?

 

Thanks in advance again!

You guys are truely the greatest of help!



Edited by flapper
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 19 March 2003 at 5:37am
loop through them seperately for displaying purposes

for the display itself...

- start two column table
- start left cell
- loop through home time with a "<br />" after each name
- stop left cell
- start right cell
- loop through other team with a <br />" after the name
- close cell
- close table

and next time can you make your thread subjects actually mean something so we can get an idea on the topic list wtf you want?
Contribute to the working anarchy we fondly call the Internet
Back to Top
 Post Reply Post Reply

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.