Page 1 of 1

SimonT STHS PHP Code for SQLite

Posted: Sat Sep 05, 2015 12:37 pm
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

Re: SimonT STHS PHP Code for SQLite

Posted: Sat Sep 12, 2015 9:55 am
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?

Re: SimonT STHS PHP Code for SQLite

Posted: Sat Sep 12, 2015 10:05 am
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.

Re: SimonT STHS PHP Code for SQLite

Posted: Sun Sep 13, 2015 8:37 am
by Bmoney0313
So there's not way to pull age from the SQLite database?

Re: SimonT STHS PHP Code for SQLite

Posted: Sun Sep 13, 2015 11:18 am
by SimonT
Look here : http://sths.simont.info/DatabaseInfo.php

You have the information you need.

Re: SimonT STHS PHP Code for SQLite

Posted: Sun Sep 13, 2015 1:14 pm
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?

Re: SimonT STHS PHP Code for SQLite

Posted: Sun Sep 13, 2015 7:21 pm
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. ;)

Re: SimonT STHS PHP Code for SQLite

Posted: Mon Sep 14, 2015 7:11 am
by Bmoney0313
Awesome! Thanks Simon.

Re: SimonT STHS PHP Code for SQLite

Posted: Tue Dec 01, 2015 4:59 pm
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