Page 1 of 2

NHL.com player ID field

Posted: Mon Nov 30, 2015 12:34 pm
by opeth771
Hi Simon,

I think it would be interesting to add a NHL.com player ID field. This would make it easier for us to grab the player's picture from their website for player profile custom pages.

I run a NHL rating league, and this would be very useful instead of having to save all images for every players and create ID's.

Thanks :)

Re: NHL.com player ID field

Posted: Mon Nov 30, 2015 5:09 pm
by Foo
I have this info stored in a database, I can share in a CSV file or something no problem.

Re: NHL.com player ID field

Posted: Tue Dec 01, 2015 1:26 pm
by opeth771
Foo wrote:I have this info stored in a database, I can share in a CSV file or something no problem.
This would be great, although for future players I will have the same problem. Also, since the field is not in the SQLITE export, I would have to have a second database with only the players id?

Not sure how to do this.
Thanks

Re: NHL.com player ID field

Posted: Tue Dec 01, 2015 9:17 pm
by Foo
yes you will have to import the CSV in a mysql table

Re: NHL.com player ID field

Posted: Thu Dec 03, 2015 12:34 pm
by opeth771
And it becomes a second task to maintain a second file... Would be easier with a field in the STHS :D

Re: NHL.com player ID field

Posted: Sun Dec 06, 2015 5:05 pm
by SimonT
If I create a ‘NHLID’ field in the STHS and I create a manual command to import the Player ID Field to the ‘NHLID’ field, will that be enough? Of course, I’ll add that field in the SQLite Database also?

Re: NHL.com player ID field

Posted: Sun Dec 06, 2015 9:51 pm
by Foo
Please Simon, now that the V3 is out, add all the new columns in SQLite at the end of each tables. If not all the php codes will have to be work over each time.

thanks.

Re: NHL.com player ID field

Posted: Mon Dec 07, 2015 10:44 pm
by SimonT
Foo wrote:Please Simon, now that the V3 is out, add all the new columns in SQLite at the end of each tables. If not all the php codes will have to be work over each time.

thanks.
I don't understand your comment? Do you query the table based on their position in the table? This is very bad programmation, used the name.

Re: NHL.com player ID field

Posted: Tue Dec 08, 2015 11:52 am
by Foo
$resultsschedule = $sqldb->query("SELECT ScheduleNextDay, ProScheduleTotalDay, FarmScheduleTotalDay FROM LeagueGeneral");
while ($rowschedule = $resultsschedule->fetchArray()) {
$Totaldays = (string)$rowschedule[1];
$TotaldaysF = (string)$rowschedule[2];
$NextDay = (string)$rowschedule[0];
}

How to do it then?

Re: NHL.com player ID field

Posted: Tue Dec 08, 2015 4:11 pm
by opeth771
SimonT wrote:If I create a ‘NHLID’ field in the STHS and I create a manual command to import the Player ID Field to the ‘NHLID’ field, will that be enough? Of course, I’ll add that field in the SQLite Database also?
Pas certain de comprendre? En gros, j'ai juste besoin d'un champ dans la page des joueurs qui me laisse ajouter le NHLID. Évidemment, la colonne NHLID va devoir se retrouver dans la SQLITE. Comme ça, je pourrai appeler les joueurs par leurs vrais ID LNH et aller "grabber" les photos, etc.

Merci :)

Re: NHL.com player ID field

Posted: Tue Dec 08, 2015 7:00 pm
by SimonT

Code: Select all

$resultsschedule = $sqldb->query("SELECT ScheduleNextDay, ProScheduleTotalDay, FarmScheduleTotalDay FROM LeagueGeneral");
while ($rowschedule = $resultsschedule->fetchArray()) {
$Totaldays = (string)$rowschedule[[color=#FF0000]'ProScheduleTotalDay'[/color]];
$TotaldaysF = (string)$rowschedule[[color=#FF0000]'FarmScheduleTotalDay'[/color]];
$NextDay = (string)$rowschedule[[color=#FF0000]'ScheduleNextDay'[/color]];
}
Regarde ici pour plus d'example: https://github.com/SimonT-STHS/STHS-PHP-Code/

Re: NHL.com player ID field

Posted: Thu Feb 11, 2016 10:01 pm
by SimonT
Hi.

With the new NHL website, is this information still relevant? I noticed NHL.com Player ID change or at least, you can't create a direct link only based on the NHL Player ID? Or I’m totally wrong?

Re: NHL.com player ID field

Posted: Fri Feb 12, 2016 1:26 pm
by Foo
I think at first it was for the player pictures... if yes it is still working with players id

https://nhl.bamcontent.com/images/heads ... 471675.jpg

Re: NHL.com player ID field

Posted: Thu Mar 24, 2016 10:06 pm
by SimonT
I add this features for 3.0.4.

P.S. You can get update to NHL ID Filed by using this script : http://sths.simont.info/Forum/viewtopic ... 26&t=12059

Re: NHL.com player ID field

Posted: Thu Jun 02, 2016 9:35 am
by opeth771
Thanks a bunch Simon, this is awesome!