Website built with SQLite
-
- The Addict / Le Drogué
- Posts: 508
- Joined: Tue Nov 29, 2005 2:30 am
- Location: Summerside, PEI, Canada
- Contact:
Website built with SQLite
www.anhs.qc.ca
Well, it wasn't supposed to be launched this quick (we were waiting for at least 2 more months before doing so) but the ANHS has launched its new website, completely based on the SQLite database, except for the boxscores which are based off the xml files.
RPHALabs is the genius behind building this one of a kind website, and he's always working on it to try and make it better. The front page of the website is not a final version, but since we had to launch the website quicker because of unexpected reasons, we had to go with this "work in progress" version.
But the rest of the site is in working condition. There is also stuff that is also accessible to the GM's when they are logged in to the website (trade form, line file submission, trade block, free agent manager, etc.). Everything else that is basically available to the public from the STHS HTML outputs is available by browsing on the website.
Enjoy the visit and we are looking for 1 or 2 GM's for team vacancies right now so let me know if you want to join!
Well, it wasn't supposed to be launched this quick (we were waiting for at least 2 more months before doing so) but the ANHS has launched its new website, completely based on the SQLite database, except for the boxscores which are based off the xml files.
RPHALabs is the genius behind building this one of a kind website, and he's always working on it to try and make it better. The front page of the website is not a final version, but since we had to launch the website quicker because of unexpected reasons, we had to go with this "work in progress" version.
But the rest of the site is in working condition. There is also stuff that is also accessible to the GM's when they are logged in to the website (trade form, line file submission, trade block, free agent manager, etc.). Everything else that is basically available to the public from the STHS HTML outputs is available by browsing on the website.
Enjoy the visit and we are looking for 1 or 2 GM's for team vacancies right now so let me know if you want to join!
Steff Thouin
Président ANHS Commish
www.anhs.qc.ca
21 ans / 30 saisons de simulation
21 years / 30 sim seasons
-
- STHS Owner / Propriétaire du STHS
- Posts: 14784
- Joined: Sat Oct 08, 2005 4:18 pm
- Location: Montreal, Canada
- Contact:
Re: Website built with SQLite
Nice job.
Do you plan on releasing some code php in open-source format?
Do you plan on releasing some code php in open-source format?
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Re: Website built with SQLite
Very, very impressive!
Less than 1% of americans can speak french
More than 70% of canadians can speak english
Want more answers, why limit yourself? Post in english!
More than 70% of canadians can speak english
Want more answers, why limit yourself? Post in english!
-
- The Addict / Le Drogué
- Posts: 508
- Joined: Tue Nov 29, 2005 2:30 am
- Location: Summerside, PEI, Canada
- Contact:
Re: Website built with SQLite
It would be hard to release open source stuff from the ANHS website as it was designed for the league specifically. It wouldn't be possible to incorporate logos or player faces/jerseys, etc. Too much work involved.
Steff Thouin
Président ANHS Commish
www.anhs.qc.ca
21 ans / 30 saisons de simulation
21 years / 30 sim seasons
-
- STHS Owner / Propriétaire du STHS
- Posts: 14784
- Joined: Sat Oct 08, 2005 4:18 pm
- Location: Montreal, Canada
- Contact:
Re: Website built with SQLite
I'll try to publish something on GitHub in the next August or September. It’s very simple code but it can help other people build on top of it.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Re: Website built with SQLite
Es-ce que ce sera possible de mettre le code source, j'aimerais savoir comment faire pour faire le lineup il me manque juste ca.
Merci
Merci
-
- The Addict / Le Drogué
- Posts: 508
- Joined: Tue Nov 29, 2005 2:30 am
- Location: Summerside, PEI, Canada
- Contact:
Re: Website built with SQLite
Comme j'ai mentionné plus tôt, le but de montrer le site de ma ligue qui est basé sur le SQLite est simplement pour montrer ce qu'il est possible de faire avec cet ajout que Simon a apporté au simulateur. Le but étant de faire en sorte que ma ligue se démarque des autres, le code de ma ligue n'est pas "open source" puisque je n'ai pas envie qu'un paquet de ligues ressemblent éventuellement à la mienne, comme beaucoup trop de ligues avec le portal.
Me suis déjà fait voler les règlements de ma ligue sans ma permission...je suis pas très chaud à l'idée de retrouver une copie de mon site non plus.
Sans rancune
Malgré tout, je ne prends que le crédit d'être le président d'une ligue qui existe depuis 15 ans et que j'ai monté de toutes pièces. Pour le site internet, je donne tout le crédit à RPHALabs qui a fait une job phénoménale et qui est un génie de la production web.
Me suis déjà fait voler les règlements de ma ligue sans ma permission...je suis pas très chaud à l'idée de retrouver une copie de mon site non plus.
Sans rancune
Malgré tout, je ne prends que le crédit d'être le président d'une ligue qui existe depuis 15 ans et que j'ai monté de toutes pièces. Pour le site internet, je donne tout le crédit à RPHALabs qui a fait une job phénoménale et qui est un génie de la production web.
Steff Thouin
Président ANHS Commish
www.anhs.qc.ca
21 ans / 30 saisons de simulation
21 years / 30 sim seasons
-
- The Addict / Le Drogué
- Posts: 770
- Joined: Mon Aug 14, 2006 5:15 pm
- Location: Vancouver, BC
- Contact:
Re: Website built with SQLite
Looks awesome... Hope I find success as well!
BFHL Admin/Commish
http://www.thebfhl.ca/bfhl
Now in Season 15, using BRHL Player v2.1 Ratings modified.
http://www.thebfhl.ca/bfhl
Now in Season 15, using BRHL Player v2.1 Ratings modified.
-
- New in Town / Le Ptit Nouveau
- Posts: 43
- Joined: Tue Jun 19, 2012 1:25 pm
Re: Website built with SQLite
Awesome looking site. I too am trying to setup a site using the SQLite database. Any pointers you could offer? I've been successful pulling roster info but I'm not struggling to setup team and league leaders like you have on your site. Any info would be greatly appreciated.
-
- The Addict / Le Drogué
- Posts: 508
- Joined: Tue Nov 29, 2005 2:30 am
- Location: Summerside, PEI, Canada
- Contact:
Re: Website built with SQLite
From what I gather, the top 5 on the front page are taken from the info in the db, then sorted by category and posted on the front page. Since I'm not the tech guy, I'm not 100% sure but I think this is pretty much what it is.
Steff Thouin
Président ANHS Commish
www.anhs.qc.ca
21 ans / 30 saisons de simulation
21 years / 30 sim seasons
-
- New in Town / Le Ptit Nouveau
- Posts: 43
- Joined: Tue Jun 19, 2012 1:25 pm
Re: Website built with SQLite
Yeah I see how where it is in the database just not coming up with a way to get it to query the top X # of players and then output those into a table.
Re: Website built with SQLite
Bmoney0313 just remember everything is a separate SQL statement, so each of the leaders is a separate recordset from the DB. Example
SELECT Name, G FROM PlayerProStat WHERE GP > 0 ORDER BY G DESC
Also, make sure all your calculated stats are in your SQL Statement as well (especially for goalies)
SELECT Name, ROUND((SA - GA) / CAST(SA AS REAL),3) AS SavePercentage FROM GoalerProStat WHERE GP > 0 ORDER BY SavePercentage DESC
SELECT Name, G FROM PlayerProStat WHERE GP > 0 ORDER BY G DESC
Also, make sure all your calculated stats are in your SQL Statement as well (especially for goalies)
SELECT Name, ROUND((SA - GA) / CAST(SA AS REAL),3) AS SavePercentage FROM GoalerProStat WHERE GP > 0 ORDER BY SavePercentage DESC
Re: Website built with SQLite
Oh I guess I should also have LIMIT 10 at the end of those:
SELECT Name, G FROM PlayerProStat WHERE GP > 0 ORDER BY G DESC LIMIT 10
SELECT Name, ROUND((SA - GA) / CAST(SA AS REAL),3) AS SavePercentage FROM GoalerProStat WHERE GP > 0 ORDER BY SavePercentage DESC LIMIT 10
SELECT Name, G FROM PlayerProStat WHERE GP > 0 ORDER BY G DESC LIMIT 10
SELECT Name, ROUND((SA - GA) / CAST(SA AS REAL),3) AS SavePercentage FROM GoalerProStat WHERE GP > 0 ORDER BY SavePercentage DESC LIMIT 10
-
- New in Town / Le Ptit Nouveau
- Posts: 43
- Joined: Tue Jun 19, 2012 1:25 pm
Re: Website built with SQLite
Never mind Simon sorted me out.
Last edited by Bmoney0313 on Fri Sep 18, 2015 10:13 am, edited 1 time in total.
-
- New in Town / Le Ptit Nouveau
- Posts: 43
- Joined: Tue Jun 19, 2012 1:25 pm
Re: Website built with SQLite
Also, any idea how I could pull the team name or team abbreviation from TeamProInfo table to go along with the player name and stats for the league leaders?