Error message when clicking on a player name

Everything about the STHS Web Portal - Open Source Version / Tout ce qui touché le STHS WebPortal – Open Source
Post Reply
delisljo
New in Town / Le Ptit Nouveau
Posts: 3
Joined: Wed Apr 07, 2010 10:30 pm

Error message when clicking on a player name

Post by delisljo » Tue Sep 16, 2014 6:48 pm

This is the message i get when i click on a player name:
Unknown column 'PlayerType' in 'where clause'

I'm no programmer, but i can troubleshoot a bit. I've checked in my tables and the PlayerType column exists in the playerscontractsoffers table (as mentionned in the 3.3 update).
I don't know to which column it refers to then. Also look into the player.php file, but i can't figure out where the issue is.

My website : http://www.hockeyphl.com/Portal/

Anyone has any ideas? Thanks a lot!

User avatar
PascalG
New in Town / Le Ptit Nouveau
Posts: 37
Joined: Wed Jun 03, 2015 7:39 pm
Location: Montréal
Contact:

Re: Error message when clicking on a player name

Post by PascalG » Wed Jun 03, 2015 7:41 pm

i have the same problem ..can anyone help me plz ?

J'ai exactement le même problème ..si quelqu'un pouvait m'aider , ça serait très apprécié :)
Pascal Goulet
Commissaire LDHS
Ligue De Hockey Simulé
http://ldhs2015.com

User avatar
PascalG
New in Town / Le Ptit Nouveau
Posts: 37
Joined: Wed Jun 03, 2015 7:39 pm
Location: Montréal
Contact:

Re: Error message when clicking on a player name

Post by PascalG » Thu Jun 04, 2015 4:19 pm

personne ??
Pascal Goulet
Commissaire LDHS
Ligue De Hockey Simulé
http://ldhs2015.com

Owen
The Crazy / Le Fou
Posts: 402
Joined: Tue Jan 01, 2013 12:43 pm
Contact:

Re: Error message when clicking on a player name

Post by Owen » Fri Jun 05, 2015 5:41 am

I've seen that error before and never looked into seeing how to fix it because I do not use the Portal's free agent system at all. Hopefully someone will have the knowledge to help you. Sorry.
Elite Hockey Experience

We're not just any league. We're the competitive league that you've waited years to find!
Now available en Français & auf Deutsch!
www.elitehockeysim.com

User avatar
PascalG
New in Town / Le Ptit Nouveau
Posts: 37
Joined: Wed Jun 03, 2015 7:39 pm
Location: Montréal
Contact:

Re: Error message when clicking on a player name

Post by PascalG » Fri Jun 05, 2015 5:36 pm

no problem thx ;)
Pascal Goulet
Commissaire LDHS
Ligue De Hockey Simulé
http://ldhs2015.com

JimToupet
The Passion One / Le Passionné
Posts: 232
Joined: Wed Jul 02, 2014 10:55 am

Re: Error message when clicking on a player name

Post by JimToupet » Fri Jun 05, 2015 11:40 pm

Quelle page tentes-tu d'afficher ?

User avatar
PascalG
New in Town / Le Ptit Nouveau
Posts: 37
Joined: Wed Jun 03, 2015 7:39 pm
Location: Montréal
Contact:

Re: Error message when clicking on a player name

Post by PascalG » Sat Jun 06, 2015 11:31 am

c'est réglé merci :)
Pascal Goulet
Commissaire LDHS
Ligue De Hockey Simulé
http://ldhs2015.com

sebgore
New in Town / Le Ptit Nouveau
Posts: 2
Joined: Sun Mar 08, 2015 9:38 am

Re: Error message when clicking on a player name

Post by sebgore » Wed Jul 22, 2015 3:57 pm

J'ai le même problème qu'annoncé ici.

Lorsque je click sur un joueur ou un gardien j'ai le message suivant :

Unknown column 'PlayerType' in 'where clause'

ex. http://shl.simulatedhockeyleague.ca/pla ... player=645


En demandant d'aller directement sur player.php (http://shl.simulatedhockeyleague.ca/player.php), je reçoit ce message :

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND PlayerType='player' AND Type='Extension' ORDER BY DateCreated DESC' at line 1

Sur le goalie.php c'est indentique à l'exception du PlayerType='player' qui devient PlayerType='goalie'


Voici les parties du Player.php qui contient PlayerType :

Code: Select all

$query_GetPlayerExtensionOffersCT = sprintf("SELECT Attempt,DateCreated FROM playersextensionoffers WHERE Player=%s AND Team=%s AND PlayerType='player' AND Type='Extension' ORDER BY DateCreated DESC ", $PID_GetPlayer, $row_GetPlayer['Team']);
$GetPlayerExtensionOffersCT = mysql_query($query_GetPlayerExtensionOffersCT, $connection) or die(mysql_error());
$row_GetPlayerExtensionOffersCT = mysql_fetch_assoc($GetPlayerExtensionOffersCT);
$totalRows_GetPlayerExtensionOffersCT = mysql_num_rows($GetPlayerExtensionOffersCT);

Code: Select all

$query_GetContractExt = sprintf("SELECT * FROM playerscontractoffers as P WHERE P.Player='%s' AND P.Type='Extension' AND PlayerType='player'", $row_GetPlayer['Number']);
$GetContractExt = mysql_query($query_GetContractExt, $connection) or die(mysql_error());
$row_GetContractExt = mysql_fetch_assoc($GetContractExt);
$totalRows_GetContractExt = mysql_num_rows($GetContractExt);

Code: Select all

$query_RFA = sprintf("SELECT P.Name FROM players as P WHERE Exists (SELECT 1 FROM playersextensionoffers AS E WHERE E.Player=P.Number AND E.Type='Extension' AND E.PlayerType <> 'goalie') AND P.Age < %s AND P.Number=%s",$UFA, $row_GetPlayer['Number']);

Notre ligue n'utilise pas les extensions automatiques du STHS. Ça serait peut-être plus simple de tout simplement effacer cette partie dans le database. Je n'ai toutefois aucune idée quelle partie garder et quelle partie effacer pour effectuer ce genre d'installation.

JimToupet
The Passion One / Le Passionné
Posts: 232
Joined: Wed Jul 02, 2014 10:55 am

Re: Error message when clicking on a player name

Post by JimToupet » Sat Jul 25, 2015 8:40 am

Simply add a PlayerType column -- varchar(10), Not Null, default value 'player' --in the playerscontractoffers table.

sebgore
New in Town / Le Ptit Nouveau
Posts: 2
Joined: Sun Mar 08, 2015 9:38 am

Re: Error message when clicking on a player name

Post by sebgore » Sun Jul 26, 2015 11:54 am

That column was already there when I checked. Deleted it et made a new one without succes.

I then deleted the Database and reinstalled it from scratch.

Again the PlayerType column was present and the problem remains.

Image



Digging in the portal, I found that every player is set to be a RFA no matter the UFA Age I put in the settings. Its probably because the portal can't see each players age.

The offer page (http://shl.simulatedhockeyleague.ca/rfa-free-agents.php) shows up with the following : Unknown column 'E.PlayerType' in 'where clause'

User avatar
CBSHL
The Accomplished One / L'Accompli
Posts: 59
Joined: Sun Jun 19, 2011 10:44 pm

Re: Error message when clicking on a player name

Post by CBSHL » Wed Jan 11, 2017 8:23 pm

Hi, I have the same problem but only with goalies. could it be that the value refers to player and not goalie?
http://www.dshl2016.com/goalie.php?player=35

Which is Connor Helleybuck playing for the Sharks.

Thanks for a fix!

JimToupet
The Passion One / Le Passionné
Posts: 232
Joined: Wed Jul 02, 2014 10:55 am

Re: Error message when clicking on a player name

Post by JimToupet » Thu Jan 12, 2017 9:38 am

Into your database management software run this line, it should solve your problem.

Code: Select all

ALTER TABLE `playerscontractoffers` ADD COLUMN `PlayerType` varchar(10) NOT NULL DEFAULT 'Player' AFTER `ContractType`

User avatar
CBSHL
The Accomplished One / L'Accompli
Posts: 59
Joined: Sun Jun 19, 2011 10:44 pm

Re: Error message when clicking on a player name

Post by CBSHL » Mon May 22, 2017 6:24 am

Hi it says that the column already exist. Also it only happens with the goalies

JimToupet
The Passion One / Le Passionné
Posts: 232
Joined: Wed Jul 02, 2014 10:55 am

Re: Error message when clicking on a player name

Post by JimToupet » Wed May 24, 2017 2:40 pm

I found the issue. I'll fix it later this weekend.

JimToupet
The Passion One / Le Passionné
Posts: 232
Joined: Wed Jul 02, 2014 10:55 am

Re: Error message when clicking on a player name

Post by JimToupet » Sat Jun 03, 2017 9:45 am

Check this post : viewtopic.php?f=32&t=13327

Post Reply