Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   ASP Code - Tracking football squares (10x10 matrix) (http://www.velocityreviews.com/forums/t792969-asp-code-tracking-football-squares-10x10-matrix.html)

binger 01-28-2004 03:10 AM

ASP Code - Tracking football squares (10x10 matrix)
 
Okay,
Superbowl is only a few days away, but I thought it would be cool to
set up an online registration for a football squares pool.

My thoughts are to have people go into anywhere on the 10x10 matrix
and put their name in.
If someone already has put their name in a square, then the text input
box is now static (i.e. cant be overwritten)...

Only problem - I'm not sure how to do this. I'd plan on using an
access database with ASP...but was wondering if anyone has quick
thoughts (or maybe actual working code)...on how to do this???

Would the database be best served with 100 rows of data (1 for each
square), or 1 row with 100 columns of data...??? thoughts?
Thanks!
Go Pats...

ActionJackson 01-28-2004 05:59 AM

Re: ASP Code - Tracking football squares (10x10 matrix)
 
I named my dog Bunger so when I say your name I had to reply!!

I would never make a 100 columns in your table for this kind of app. If
the position matters just record a value from 1 to 100 for each person.
As you output the columns/rows just use box 1 as the upper left and 10
is upper right. Box 11 would just be the start of the 2nd row and
continue this pattern using a loop.

Access and ASP would be ok for this one. You would simply record the
name and position. 2 columns of data. Very simple.

I do admit I don't even know what a football squares pool is so maybe
there is more to this app than I know :)

Shawn Jackson
Owner and Creator
http://www.actionjackson.com
http://www.devdex.com


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

binger 01-28-2004 01:38 PM

Re: ASP Code - Tracking football squares (10x10 matrix)
 
ActionJackson <action@actionjackson.com> wrote in message news:<O6PUbPW5DHA.2344@TK2MSFTNGP09.phx.gbl>...
> I named my dog Bunger so when I say your name I had to reply!!
>
> I would never make a 100 columns in your table for this kind of app. If
> the position matters just record a value from 1 to 100 for each person.
> As you output the columns/rows just use box 1 as the upper left and 10
> is upper right. Box 11 would just be the start of the 2nd row and
> continue this pattern using a loop.
>
> Access and ASP would be ok for this one. You would simply record the
> name and position. 2 columns of data. Very simple.
>
> I do admit I don't even know what a football squares pool is so maybe
> there is more to this app than I know :)
>
> Shawn Jackson
> Owner and Creator
> http://www.actionjackson.com
> http://www.devdex.com
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!


....some people do call me Bunger for run...
as for a football square pool : think of this:
Start with a 10 x 10 matrix. Have people fill their names in all of
the 100 cells. Then, randomly place the numbers 0 thru 9 across the
horizontal access, then do the same down the vertical axis.
For the football pool, the horizontal axis represents team 1, and the
horizontal axis represents team 2. At the end of each quarter played,
you would look at the "ones digit" for each team, and find out where
this numeric combination meets in the squares. I.e. if team 1 had 17
points, and team 2 had 14 points, you would find the intersection of
team 1(7) and team 2(4) and whoevers name was there would win $$ for
that quarter...

Therefore, I was looking for a routine where people could visually see
a 10X10 matrix on the screen, each cell with an input box to put their
name it. As soon as someone would select a square (and input it),
that cell becomes 'fixed', and only the un-selected squares remaining
are available for text input...

Hope that makes sense...any further ideas???
Thanks,
bUnger...

Roland Hall 01-28-2004 04:01 PM

Re: ASP Code - Tracking football squares (10x10 matrix)
 
"binger" wrote:
: ActionJackson wrote:
: > I would never make a 100 columns in your table for this kind of app. If
: > the position matters just record a value from 1 to 100 for each person.
: > As you output the columns/rows just use box 1 as the upper left and 10
: > is upper right. Box 11 would just be the start of the 2nd row and
: > continue this pattern using a loop.
: >
: > Access and ASP would be ok for this one. You would simply record the
: > name and position. 2 columns of data. Very simple.
:
: Therefore, I was looking for a routine where people could visually see
: a 10X10 matrix on the screen, each cell with an input box to put their
: name it. As soon as someone would select a square (and input it),
: that cell becomes 'fixed', and only the un-selected squares remaining
: are available for text input...

http://www.partysoftware.com/Football_Squares.html



Jeff Cochran 01-28-2004 04:16 PM

Re: ASP Code - Tracking football squares (10x10 matrix)
 
On 27 Jan 2004 19:10:48 -0800, manonmssn2001nospam@yahoo.com (binger)
wrote:

>Superbowl is only a few days away, but I thought it would be cool to
>set up an online registration for a football squares pool.


Assuming you're doing this in the Bahamas of course... :)

>My thoughts are to have people go into anywhere on the 10x10 matrix
>and put their name in.
>If someone already has put their name in a square, then the text input
>box is now static (i.e. cant be overwritten)...


Better, just print the names and empty squares get a "Click here to
select this square" link.

>Only problem - I'm not sure how to do this. I'd plan on using an
>access database with ASP...but was wondering if anyone has quick
>thoughts (or maybe actual working code)...on how to do this???


Did you Google for any? The code really wouldn't be hard, but you'll
have to learn quick.

>Would the database be best served with 100 rows of data (1 for each
>square), or 1 row with 100 columns of data...??? thoughts?


Always less columns than rows. Especially since you could have as
little as a single column for this.

Jeff

binger 01-29-2004 03:25 AM

Re: ASP Code - Tracking football squares (10x10 matrix)
 
Peter - awesome help...i took what you sent and this rocked!!!!!
thanks again for the recommendations...

.....go patriots...


2004 FOOTBALL SQUARES POOL&nbsp; <BR>
<font color="#FF0000">
PATRIOTS SCORE ACROSS THE TOP<BR>
</font><font color="#0000FF">
PANTHERS SCORE DOWN THE SIDE</font>
<p align="center">$50 FOR 2 SQUARES !!!!
</p>
<ul>
<li>
<p align="left">OFFICIAL NUMBERS WILL BE DRAWN PRIOR TO KICKOFF
THIS SUNDAY</li>
<li>
<p align="left">ONCE YOU SUBMIT YOUR SQUARE - YOU CAN NOT UNDO
YOUR
SELECTION - SO BE SURE OF YOUR PICKS...</li>
<li>
<p align="left">PATRIOTS WILL KICK ASS</li>
</ul>
<form method="POST" action="update.asp" >
<div align="center">
<center>
<table border="1" height="400" width="400">
<%
do while Not rs.eof
response.write("<tr>")
for i = 1 to 10
response.write("<td>")
Response.Write "<input name=""square" & RS("ID") & """ type=""text""
maxlength=""50"" size=""7"" value=""" & RS("name") & """"
If Len(RS("name")) > 0 Then
Response.Write " readonly"
End If
Response.Write ">"
RS.MoveNext()
response.write("<td>")
next
response.write("</tr>")
rownumber=rownumber+1
loop

%>

</table>

</center>
</div>
<p align="center"><input type="submit" value="Submit"
name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
<p align="center">
<img height="94" alt="Patriots.com Home" src="brown800_home.jpg"
width="152" border="0">&nbsp;
VS.&nbsp;<img border="0" src="header-sp.gif">
<p align="center"><a href="http://www.patriots.com/SuperBowl/XXXVIII/"
target="_top"><img height="250" src="img93_000827.jpg" width="250"
border="0"></a></p>

</body>

</html>


All times are GMT. The time now is 01:23 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.