Page 1 of 2

Website built with SQLite

Posted: Mon Aug 10, 2015 10:51 am
by Président ANHS
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!

Re: Website built with SQLite

Posted: Mon Aug 10, 2015 5:52 pm
by SimonT
Nice job.

Do you plan on releasing some code php in open-source format?

Re: Website built with SQLite

Posted: Mon Aug 10, 2015 8:53 pm
by Kramden23
Very, very impressive!

Re: Website built with SQLite

Posted: Tue Aug 11, 2015 8:24 am
by Président ANHS
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.

Re: Website built with SQLite

Posted: Tue Aug 11, 2015 10:14 pm
by SimonT
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.

Re: Website built with SQLite

Posted: Sat Aug 15, 2015 8:41 am
by hugocaha
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

Re: Website built with SQLite

Posted: Wed Aug 19, 2015 1:20 am
by Président ANHS
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.

Re: Website built with SQLite

Posted: Thu Sep 03, 2015 5:04 pm
by ynohtna
Looks awesome... Hope I find success as well!

Re: Website built with SQLite

Posted: Sun Sep 13, 2015 11:13 am
by Bmoney0313
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.

Re: Website built with SQLite

Posted: Mon Sep 14, 2015 11:47 am
by Président ANHS
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.

Re: Website built with SQLite

Posted: Mon Sep 14, 2015 3:01 pm
by Bmoney0313
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

Posted: Thu Sep 17, 2015 12:17 pm
by RPHALabs
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

Re: Website built with SQLite

Posted: Thu Sep 17, 2015 12:54 pm
by RPHALabs
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

Re: Website built with SQLite

Posted: Thu Sep 17, 2015 3:21 pm
by Bmoney0313
Never mind Simon sorted me out.

Re: Website built with SQLite

Posted: Thu Sep 17, 2015 4:44 pm
by Bmoney0313
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?