תבנית:QueryGamesTemplate: הבדלים בין גרסאות בדף
מתוך מכביפדיה
אין תקציר עריכה
(הצגת שחקנים אם חיפשו אותם)
שורה 15: שורה 15:
                         -->{{#vardefine: PlayerEvent2|{{המרות/תיאור אירוע לשליפת משחקים למספר אירוע| אירוע={{{PlayerAction2|}}} }} }}<!--
                         -->{{#vardefine: PlayerEvent2|{{המרות/תיאור אירוע לשליפת משחקים למספר אירוע| אירוע={{{PlayerAction2|}}} }} }}<!--
                         -->{{#vardefine: PlayerSubEvent2|{{תבנית: המרות/תיאור תת אירוע למספר תת אירוע| תת אירוע={{{PlayerSubAction2|}}} }} }}<!--
                         -->{{#vardefine: PlayerSubEvent2|{{תבנית: המרות/תיאור תת אירוע למספר תת אירוע| תת אירוע={{{PlayerSubAction2|}}} }} }}<!--
                        -->{{#vardefine: Player1Defined| {{{Player|}}}{{{PlayerNumber|}}}{{{PlayerAction|}}}{{{PlayerActionMinute|}}}{{{PlayerSubAction|}}}{{{PlayerSubActionMinute|}}}{{{PlayerPosition|}}} }}<!--
                        -->{{#vardefine: Player2Defined| {{{Player2|}}}{{{PlayerNumber2|}}}{{{PlayerAction2|}}}{{{PlayerActionMinute2|}}}{{{PlayerSubAction2|}}}{{{PlayerSubActionMinute2|}}}{{{PlayerPosition2|}}} }}




We use the hacky way of concating all player related params in order to "turn on" the check for Team=1,
We use the hacky way of concating all player related params in order to "turn on" the check for Team=1,
There are some games without any maccabi players, we dont want to avoid querying them if we can avoid it (means we search for the game data and not players data).
There are some games without any maccabi players, we don't want to avoid querying them if we can avoid it (means we search for the game data and not players data).


Moreover, It seems that writing "Profiles.Position HOLDS Players_Positions.PositionType" on the join clause is doing right join and therefore disable the ability to query games without players, so we have to follow the plain sql way to do it: https://www.mediawiki.org/wiki/Extension:Cargo/Querying_data#The_"HOLDS"_command
Moreover, It seems that writing "Profiles.Position HOLDS Players_Positions.PositionType" on the join clause is doing right join and therefore disable the ability to query games without players, so we have to follow the plain SQL way to do it: https://www.mediawiki.org/wiki/Extension:Cargo/Querying_data#The_"HOLDS"_command
-->{{#cargo_query:
-->{{#cargo_query:
tables=Games_Catalog, Competitions_Catalog, Games_Results, Games_Events, Games_Events=Events2, Days_In_Week, Games_Videos, Football_Games_Uniforms, Opponents, Profiles, Profiles__Position, Players_Positions
tables=Games_Catalog, Competitions_Catalog, Games_Results, Games_Events, Games_Events=Events2, Days_In_Week, Games_Videos, Football_Games_Uniforms, Opponents, Profiles, Profiles__Position, Players_Positions
שורה 58: שורה 61:




{{#if: {{{Player|}}}{{{PlayerNumber|}}}{{{PlayerAction|}}}{{{PlayerActionMinute|}}}{{{PlayerSubAction|}}}{{{PlayerSubActionMinute|}}}{{{PlayerPosition|}}}| And Games_Events.Team = 1}}
{{#if: {{#var: Player1Defined}}| And Games_Events.Team = 1}}
{{#if: {{{Player|}}} |  AND Games_Events.PlayerName = "{{{Player}}}" }}
{{#if: {{{Player|}}} |  AND Games_Events.PlayerName = "{{{Player}}}" }}
{{#if: {{{PlayerNumber|}}} |  AND Games_Events.PlayerNumber = {{{PlayerNumber}}} }}
{{#if: {{{PlayerNumber|}}} |  AND Games_Events.PlayerNumber = {{{PlayerNumber}}} }}
שורה 68: שורה 71:




{{#if: {{{Player2|}}}{{{PlayerNumber2|}}}{{{PlayerAction2|}}}{{{PlayerActionMinute2|}}}{{{PlayerSubAction2|}}}{{{PlayerSubActionMinute2|}}}{{{PlayerPosition2|}}}| And Events2.Team = 1}}
{{#if: {{#var: Player2Defined}}| And Events2.Team = 1}}
{{#if: {{{Player2|}}} |  AND Events2.PlayerName = "{{{Player2}}}" }}
{{#if: {{{Player2|}}} |  AND Events2.PlayerName = "{{{Player2}}}" }}
{{#if: {{{PlayerNumber2|}}} |  AND Events2.PlayerNumber = {{{PlayerNumber2}}} }}
{{#if: {{{PlayerNumber2|}}} |  AND Events2.PlayerNumber = {{{PlayerNumber2}}} }}
שורה 110: שורה 113:
           ,CONCAT('[', Games_Videos.Highlights, ' לינק]')=תקציר
           ,CONCAT('[', Games_Videos.Highlights, ' לינק]')=תקציר
           ,CONCAT('[[', 'מדי עונת ', Football_Games_Uniforms.Season, '|', Football_Games_Uniforms.KitName, ']]' )=מדים
           ,CONCAT('[[', 'מדי עונת ', Football_Games_Uniforms.Season, '|', Football_Games_Uniforms.KitName, ']]' )=מדים
{{#if: {{{Player|}}}{{{PlayerNumber|}}}{{{PlayerAction|}}}{{{PlayerActionMinute|}}}{{{PlayerSubAction|}}}{{{PlayerSubActionMinute|}}}{{{PlayerPosition|}}}| ,Games_Events.PlayerName=שחקן, Games_Events.PlayerNumber=מספר}}
{{#if: {{#var: Player1Defined}} | ,Games_Events.PlayerName=1שחקן, Games_Events.PlayerNumber=1מספר }}
{{#if: {{#var: Player2Defined}} | ,Events2.PlayerName=2שחקן, Events2.PlayerNumber=2מספר }}
 


|limit=5000
|limit=5000

גרסה מ־17:22, 15 ביולי 2022

לינק לעמוד לחיפוש משחקים

ערכו את הדף כדי לצפות בטקסט התבנית.