Website built with SQLite

If you need help building your website, this is the place to hang out. If you're an HTML, PHP, Perl or web database geek, check it out. / Si vous avez besoin d'aide pour construire votre site web, c'est le forum à regarder! Si vous êtes un expert en HTML, PHP, Perl ou en base de données, c'est le forum pour vous!
Président ANHS
The Addict / Le Drogué
Posts: 508
Joined: Tue Nov 29, 2005 2:30 am
Location: Summerside, PEI, Canada
Contact:

Website built with SQLite

Post 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!
Image
Steff Thouin
Président ANHS Commish
www.anhs.qc.ca

21 ans / 30 saisons de simulation
21 years / 30 sim seasons
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14755
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: Website built with SQLite

Post by SimonT »

Nice job.

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
Kramden23
The Addict / Le Drogué
Posts: 763
Joined: Tue May 13, 2008 8:33 pm

Re: Website built with SQLite

Post by Kramden23 »

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!
Président ANHS
The Addict / Le Drogué
Posts: 508
Joined: Tue Nov 29, 2005 2:30 am
Location: Summerside, PEI, Canada
Contact:

Re: Website built with SQLite

Post 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.
Image
Steff Thouin
Président ANHS Commish
www.anhs.qc.ca

21 ans / 30 saisons de simulation
21 years / 30 sim seasons
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14755
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: Website built with SQLite

Post 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.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
hugocaha
New in Town / Le Ptit Nouveau
Posts: 36
Joined: Thu Aug 13, 2015 8:35 pm

Re: Website built with SQLite

Post 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
Président ANHS
The Addict / Le Drogué
Posts: 508
Joined: Tue Nov 29, 2005 2:30 am
Location: Summerside, PEI, Canada
Contact:

Re: Website built with SQLite

Post 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.
Image
Steff Thouin
Président ANHS Commish
www.anhs.qc.ca

21 ans / 30 saisons de simulation
21 years / 30 sim seasons
ynohtna
The Addict / Le Drogué
Posts: 770
Joined: Mon Aug 14, 2006 5:15 pm
Location: Vancouver, BC
Contact:

Re: Website built with SQLite

Post by ynohtna »

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.
Bmoney0313
New in Town / Le Ptit Nouveau
Posts: 43
Joined: Tue Jun 19, 2012 1:25 pm

Re: Website built with SQLite

Post 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.
Président ANHS
The Addict / Le Drogué
Posts: 508
Joined: Tue Nov 29, 2005 2:30 am
Location: Summerside, PEI, Canada
Contact:

Re: Website built with SQLite

Post 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.
Image
Steff Thouin
Président ANHS Commish
www.anhs.qc.ca

21 ans / 30 saisons de simulation
21 years / 30 sim seasons
Bmoney0313
New in Town / Le Ptit Nouveau
Posts: 43
Joined: Tue Jun 19, 2012 1:25 pm

Re: Website built with SQLite

Post 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.
RPHALabs
New in Town / Le Ptit Nouveau
Posts: 36
Joined: Thu Sep 11, 2014 2:42 pm

Re: Website built with SQLite

Post 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
RPHALabs
New in Town / Le Ptit Nouveau
Posts: 36
Joined: Thu Sep 11, 2014 2:42 pm

Re: Website built with SQLite

Post 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
Bmoney0313
New in Town / Le Ptit Nouveau
Posts: 43
Joined: Tue Jun 19, 2012 1:25 pm

Re: Website built with SQLite

Post by Bmoney0313 »

Never mind Simon sorted me out.
Last edited by Bmoney0313 on Fri Sep 18, 2015 10:13 am, edited 1 time in total.
Bmoney0313
New in Town / Le Ptit Nouveau
Posts: 43
Joined: Tue Jun 19, 2012 1:25 pm

Re: Website built with SQLite

Post 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?
Post Reply