OK, I don’t contribute much to the software community but I’m feeling generous today.
Since I run this pool at my office and for some unknown and weird reasons the link is #1 on Google for Euro 2008 Office Pool, I figured I’d share the piece of code that runs that “system” with the public.
Its basically a PHP/MySQL app with a few tables that are self-explanatory (I hope). You just enter who picked what teams and players and then just update the results as they happen – watch the entrants rise and fall as each team wins, loses or ties. Its quite fun really, much better than doing cocaine. The PDF form that entrants fill out is part of the zip along with everything else you need, but here it is anyway if you want to take a look.
Download the ZIP file here. All you really need to do is dump the schema in a MySQL 5 database (maybe even 4 might work), change the database info in ez_sql.php file (just replace INSERT_HOST tags etc.) and you’re good to go.
If you do feel like joining the pool, send me your entry form and $16 through PayPal to zarars at gmail
Update: I’ve updated this post with an improved version of this software which includes sample data. Here’s the older version.
12 Comments
1. Thank you for sharing
2. Please write and deliver a verbose user’s manual by Friday, the 30th of May
I’m sorry to be thick but I am a graphic designer for the most part, I’m sure you understand… I assume/d I’d be populating the table’s data manually but I see quite a lot of reference in the php to soccernet data. Would you mind throwing out a brief summary of how this works?
Thanks regardless, I hope this finds you cheerful
Nice script…
depress0r, the soccernet links are just a href link to the teams page. You don’t have to worry about it. All I needed to do to get it to work was dump the schema in a mysql table change the INSERT_HOST etc. stuff in ez_sql.php.
Hi Dave, thanks for the code. How do I reveal the standings in my version?
Thanks in advance
Peter
oops! I meant picks…
Fixed. While using dummy data to test the entrants table, I had left the ‘players’ fields empty. After assigning values other than NULL the entrants showed up fine.
Thanks to Zarar.
How do the quarter, semi, and finals work? Are these also based on the ranking system?
Thanks a million for this.
forget above. Did not fully read script. sorry bout that. Thanks.
Hey, I tried to setup this up, but I get the error Fatal Error: ezSQL_mysql requires ezSQLcore (ez_sql_core.php) to be included/loaded before it can be used
What am I missing??
Silly question… nevermind… got it working
Thanks for the script. If anybody’s standings aren’t showing up, just make sure you have values for every field in the entrants table and that those ids correspond to something in the other two tables (teams and players).
It took me a while to figure that out. The author should’ve probably mentioned that in the post but thanks anyway.
thanks a lot bro, for your share,,
Thanks for your scripts
One Trackback/Pingback
[...] 26th 2008 9:34pm [-] From: depressedprogrammer.wordpress.com [...]