SimonT STHS PHP Code for 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!
Post Reply
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14755
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

SimonT STHS PHP Code for SQLite

Post by SimonT »

Hey.

Since I start building the SQLite database, I create some PHP webpage leveraging the SQLite database information for my own pleasure and personal challenge. Today, I upload them on GitHub where you can read them, copy them and even fork them. In the long run (After a lot more work), I’ll probably add some of them directly into the STHS default website.

If you want to contribute to the code directly in repository, please contact me by email so we can discuss about it.

Link : https://github.com/SimonT-STHS/STHS-PHP-Code
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Bmoney0313
New in Town / Le Ptit Nouveau
Posts: 43
Joined: Tue Jun 19, 2012 1:25 pm

Re: SimonT STHS PHP Code for SQLite

Post by Bmoney0313 »

In the PlayerInfo.php file you have an echo from PlayerInfo table column 'Age'. I'm not seeing that column at all in the database that I created from the demo nor the database from the league I'm in. Is there a setting somewhere within STHS to output the Age column to the SQLite database?
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14755
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: SimonT STHS PHP Code for SQLite

Post by SimonT »

Well, it's a bug in the code. This code is for demonstration purpose only and far from being ready to be used.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Bmoney0313
New in Town / Le Ptit Nouveau
Posts: 43
Joined: Tue Jun 19, 2012 1:25 pm

Re: SimonT STHS PHP Code for SQLite

Post by Bmoney0313 »

So there's not way to pull age from the SQLite database?
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14755
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: SimonT STHS PHP Code for SQLite

Post by SimonT »

Look here : http://sths.simont.info/DatabaseInfo.php

You have the information you need.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Bmoney0313
New in Town / Le Ptit Nouveau
Posts: 43
Joined: Tue Jun 19, 2012 1:25 pm

Re: SimonT STHS PHP Code for SQLite

Post by Bmoney0313 »

Yeah I see the birthday is in the database but there's nothing in the database that actually has the age of the players? I guess I would need to find some SQLite 3 formula to take today's date and figure out the difference in years?
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14755
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: SimonT STHS PHP Code for SQLite

Post by SimonT »

Hi.

I add the age value for the next version (2.3.2) already. That probably why you see in PHP code then. ;)
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Bmoney0313
New in Town / Le Ptit Nouveau
Posts: 43
Joined: Tue Jun 19, 2012 1:25 pm

Re: SimonT STHS PHP Code for SQLite

Post by Bmoney0313 »

Awesome! Thanks Simon.
opeth771
The Accomplished One / L'Accompli
Posts: 129
Joined: Sat Feb 25, 2012 9:49 am

Re: SimonT STHS PHP Code for SQLite

Post by opeth771 »

Bmoney0313 wrote:So there's not way to pull age from the SQLite database?
You can also use SQLite browser, it is very useful for working with SQLite databases
Post Reply