Page 4 of 5

Re: SQLite

Posted: Sun Jun 28, 2015 10:20 am
by Foo
I tested it, looks great so far and it is fast. I have 2 questions:

what's the difference with those tables : ProTeamLines and ProTeamLinesNumberonly ??

in the column StandingPlayoffTitle of ProTeamStats, will it enter the Wild Card in here since beginning of the season? if not, it would be much easier for us to construct a wild card standing page with a column that have those information in, no need for division name in it. Something like this:

C1D1P1
C1D1P2
C1D1P3
C1D2P1
C1D2P2
C1D2P3
C1WC1
C1WC2

C for Conference, D for Division and P for Position in the division. After that, very easy to do a wild card standing page. Thanks.

Re: SQLite

Posted: Sun Jun 28, 2015 1:48 pm
by SimonT
TeamProLinesNumberOnly is all number and this is now I keep in the STHS. This table might get use in the future if we build a STHS Web Client.
TeamProLines is the same value but instead of forcing you to multiple lookup in the PlayerInfo table to get the player name, I write the name directly. This way, you can show Team Lines page with 1 SQL query.

The StandingPlayoffTitle only show the E, X, Y, and Z title. If you want to build the ranking order, you need to check the Ranking Order table.

Re: SQLite

Posted: Sun Jun 28, 2015 4:34 pm
by Foo
TeamProLineNumberOnly you mean it shows player id instead of names?

The RankingOrder Table is very low in information. Assuming TeamOrder is a number from 1 to 30? I need more stuff to build someting like this
http://www.nhl.com/ice/standings.htm?ty ... v-stn-conf

Like teamOwnDivision ranking and teamOwnConference ranking. Now they are overall from 1 to 30.

Re: SQLite

Posted: Sun Jun 28, 2015 5:09 pm
by RPHALabs
I disagree, there are numerous ways to use subqueries to get the ranking system you want. I would do something like this, I am sure you can modify this to do whatever you need:

Code: Select all

SELECT i.Name, r.TeamOrder AS OverallOrder, 
(
	SELECT COUNT(*) 
	FROM TeamProInfo AS i2 
	LEFT JOIN RankingOrder AS r2 ON r2.TeamProNumber = i2.Number 
	WHERE  r2.TeamOrder < r.TeamOrder 
	AND i2.Division = i.Division
) + 1 AS DivisionRank,  
(
	SELECT COUNT(*) 
	FROM TeamProInfo AS i2 
	LEFT JOIN RankingOrder AS r2 ON r2.TeamProNumber = i2.Number 
	WHERE  r2.TeamOrder < r.TeamOrder 
	AND i2.Conference = i.Conference
) + 1 AS ConferenceRank  
FROM TeamProInfo AS i 
LEFT JOIN RankingOrder AS r ON r.TeamProNumber = i.Number
ORDER BY i.Conference, i.Division, DivisionRank

Re: SQLite

Posted: Sun Jun 28, 2015 9:56 pm
by Foo
I did not say it was impossible, it is more work for nothing. We already have a table for that, why not add some easy info in it to have a simpler code.

Re: SQLite

Posted: Mon Jun 29, 2015 2:53 pm
by DaGreat1
Found something in the PlayerInfo, I don't know if it has been reported yet, but injury condition (column Condition) is missing the decimal.

It's not that big of a deal, but i'm using decimals in my fatigue settings and I think, in a programmer point of view, I think it could be real quick fix to adjust for the next version (though I haven't seen your code, so I just assume :P )

Great addition by the way! Love it!

Thanks

Re: SQLite

Posted: Mon Jun 29, 2015 4:34 pm
by SimonT
For the Condition column, I always output the full integer number in the CSV, XML so I continue with it in SQLite. In 2.3.2, I had a new column call ConditionDecimal with Data Type of Real.

Re: SQLite

Posted: Wed Jul 01, 2015 9:59 am
by DaGreat1
Is the Team News available somewhere? I looked in the CSV, XML and SQLite and didn't find it anywhere.

Would be great if it was in the SQLite

Thanks

Re: SQLite

Posted: Wed Jul 01, 2015 10:56 am
by Foo
Also, free agent offers that can be stored in a CSV in the Automatic Free Agent window would be a nice add in SQLite.

Re: SQLite

Posted: Wed Jul 01, 2015 11:30 am
by SimonT
I'll check what I can add in the next version.

Re: SQLite

Posted: Tue Jul 14, 2015 8:49 pm
by SimonT
I just add TeamNews in the SQLite.
For the free agents, it's tricky to add in there because everyone will be able to see them. It's fairly easy to download the SQLite file and read all the offers in there. I find this dangerous.

Re: SQLite

Posted: Wed Jul 15, 2015 6:51 am
by JimToupet
SimonT wrote:I just add TeamNews in the SQLite.
For the free agents, it's tricky to add in there because everyone will be able to see them. It's fairly easy to download the SQLite file and read all the offers in there. I find this dangerous.
You can prevent download with a .htaccess file.

Re: SQLite

Posted: Fri Aug 07, 2015 7:22 am
by RPHALabs
Hey Simon, Trying to use the LeagueLog table in 2.3.1 and the entire table is empty. There is not one record in the table at all. Is this a bug of some sort? Am I missing something? I do see a change in the table schema as you have the color and text separated in the fields, but no records?

Re: SQLite

Posted: Fri Aug 07, 2015 9:55 am
by SimonT
How does your transaction html look like? It's empty or not?

Re: SQLite

Posted: Fri Aug 07, 2015 10:22 am
by RPHALabs
HTML Transactions is populated - http://anhs.qc.ca/output_saison/ANHS-Transactions.html
CSV Transactions is populated - http://anhs.qc.ca/output_saison/csvxml/ ... action.csv
SQLite Table empty