Print Page | Close Window

Anyone got any ideas?*

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=1138
Printed Date: 28 March 2026 at 11:06pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Anyone got any ideas?*
Posted By: flapper
Subject: Anyone got any ideas?*
Date 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!




Replies:
Posted By: MorningZ
Date 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



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