Survivor Pool - Allow a user to select a team twice

Post here to discuss topics relate to the 4.x version for the ASP Football Pool software program. All support topics should go here.
Post Reply
jhronesz
Posts: 43
Joined: Sat Aug 31, 2013 4:20 pm

Survivor Pool - Allow a user to select a team twice

Post by jhronesz »

I turned off the option to only allow a user to select a team one time. However, I would like to let the users pick the same team only twice. Anyone know how to do this?
jhronesz
Posts: 43
Joined: Sat Aug 31, 2013 4:20 pm

Re: Survivor Pool - Allow a user to select a team twice

Post by jhronesz »

nevermind. was able to figure it out.
User avatar
admin
Site Admin
Posts: 159
Joined: Mon Aug 26, 2013 3:47 pm

Re: Survivor Pool - Allow a user to select a team twice

Post by admin »

Can you post what your solution was for anyone else that might want to do this in the future?

Phil
jhronesz
Posts: 43
Joined: Sat Aug 31, 2013 4:20 pm

Re: Survivor Pool - Allow a user to select a team twice

Post by jhronesz »

Sure.

Create a query in the access database and call it whatever you want. In design mode for the query, paste the following in the sql view

SELECT [Username] & " " & [Pick] AS Expr1, SidePicks.Username, SidePicks.Pick
FROM SidePicks;

Create another query and call it whatever you want. In design mode for the query, paste the following in the sql view

SELECT First(SurvivorDuplicates1.Expr1) AS [Expr1 Field], Count(SurvivorDuplicates1.Expr1) AS NumberOfDups, SurvivorDuplicates1.Username, SurvivorDuplicates1.Pick
FROM SurvivorDuplicates1
GROUP BY SurvivorDuplicates1.Username, SurvivorDuplicates1.Pick, SurvivorDuplicates1.Expr1
HAVING (((Count(SurvivorDuplicates1.Expr1))>=2));

Everywhere you see SurvivorDuplicates1, you would have to rename to whatever you named the first query. Also, you can see at the end of this code that it has >=2. You can change this number to whatever number you want.

Next, In includes/side.asp, find the following code:

function GetUsedSidePicksList(username)

dim list, sql, rs

GetUsedSidePicksList = ""

sql = "SELECT Pick FROM SidePicks" _

where it says SidePicks, change this to whatever you named the second query we set up. That should do it.
User avatar
admin
Site Admin
Posts: 159
Joined: Mon Aug 26, 2013 3:47 pm

Re: Survivor Pool - Allow a user to select a team twice

Post by admin »

Thanks for posting, I'm sure that will help someone out!!

Phil
Post Reply