תבנית:Gamesearchbball: הבדלים בין גרסאות בדף

מתוך ויקיפועל
קפיצה לניווט קפיצה לחיפוש
אין תקציר עריכה
(מניעת שכפול קוד)
 
שורה 1: שורה 1:
{| border="1" cellpadding="2" cellspacing="0" align="middle"
#REDIRECT [[תבנית:שליפת טבלת משחקים שאלתא]]
|- style="background:#FF0000;"
!מפעל
!מפגשים
!נצחונות
!תיקו
!הפסדים
!הפרש
|-
{{#ifeq:{{{מפעל}}}|ליגה|{{שליפת נתוני משחקים|מחלקה={{{מחלקה}}}|ליגה=1|מפעל={{{מפעל}}}|יריבה={{{יריבה}}}|תוצאה={{{תוצאה}}}|ביתיות={{{ביתיות}}}||מיום={{{מיום}}}|מחודש={{{מחודש}}}|משנה={{{משנה}}}|ליום={{{ליום}}}|לחודש={{{לחודש}}}|לשנה={{{לשנה}}}}}|
{{#ifeq:{{{מפעל}}}|(הכל)|{{שליפת נתוני משחקים|מחלקה={{{מחלקה}}}|ליגה=1|מפעל={{{מפעל}}}|יריבה={{{יריבה}}}|תוצאה={{{תוצאה}}}|ביתיות={{{ביתיות}}}||מיום={{{מיום}}}|מחודש={{{מחודש}}}|משנה={{{משנה}}}|ליום={{{ליום}}}|לחודש={{{לחודש}}}|לשנה={{{לשנה}}}}}|}}}}{{שליפת נתוני משחקים|מחלקה={{{מחלקה}}}|ליגה=0|מפעל={{{מפעל}}}|יריבה={{{יריבה}}}|תוצאה={{{תוצאה}}}|ביתיות={{{ביתיות}}}||מיום={{{מיום}}}|מחודש={{{מחודש}}}|משנה={{{משנה}}}|ליום={{{ליום}}}|לחודש={{{לחודש}}}|לשנה={{{לשנה}}}}}
|}
{{#vardefine:whereclause|
{{#ifeq:{{{ליגה}}}|1| liga='1' |{{#ifeq:{{{ליגה}}}|0|liga='0'|liga IS NOT NULL}}}}
{{#ifexpr:{{#len:{{{מחלקה}}}}} > 0| AND department='{{{מחלקה}}}' | AND department='whatever'}}
{{#ifeq:{{{תוצאה}}}|הכל|| AND result='{{{תוצאה}}}' }}
{{#ifeq:{{{ביתיות}}}|הכל|| AND homegame='{{{ביתיות}}}' }}
{{#ifeq:{{{יריבה}}}|(הכל)|| AND (Games.host='{{החלפת שם יריב שאילתא|יריבה={{{יריבה|}}}}}' OR Games.oponent='{{החלפת שם יריב שאילתא|יריבה={{{יריבה|}}}}}')|}}
{{#ifexpr:{{#len:{{{מיום}}}}} > 0| AND (year>'{{{משנה}}}' OR (year='{{{משנה}}}' AND month>'{{{מחודש}}}') OR          (year='{{{משנה}}}' AND month='{{{מחודש}}}'  AND day>='{{{מיום}}}'))|}} 
{{#ifexpr:{{#len:{{{ליום}}}}} > 0| AND (year<'{{{לשנה}}}' OR (year='{{{לשנה}}}' AND month<'{{{לחודש}}}') OR  (year='{{{לשנה}}}' AND month='{{{לחודש}}}'  AND day<='{{{ליום}}}'))|}}
{{#ifeq:{{{מפעל}}}|(הכל)||{{#ifeq:{{{מפעל}}}|ליגה| AND liga='1' | AND mifal='{{{מפעל}}}'  }} }}
}}
{{#cargo_query:
tables=Games
|fields=concat('<div class=\'',Games.result,'cell\'>','[[',Games.ona,']]','</div>')=עונה,
concat('<div class=\'',Games.result,'cell\'>','[[',Games.mifal,']]','</div>')=מפעל,
concat('<div class=\'',Games.result,'cell\'>',Games.stage,'</div>')=שלב,
concat('<div class=\'',Games.result,'cell\'>','[[',Games.host,']]','</div>')=מארחת,
concat('<div class=\'',Games.result,'cell\'>','[[',Games.oponent,']]','</div>')=אורחת,
IF(Games.liga = '1',concat('<div class=\'',Games.result,'cell\'>','[[עונת  ',Games.ona,' (',Games.department,') ',Games.stage,'|',Games.awayscore,':',Games.homescore,']]','</div>'),concat('<div class=\'',Games.result,'cell\'>','[[עונת  ',Games.ona,' (',Games.department,') ',Games.mifal,' ',Games.stage,'|',Games.awayscore,':',Games.homescore,']]','</div>'))=תוצאה,
|where={{#var:whereclause}}
|format=dynamic table
|order by=year,month,day
|default=
}}
 
[[קטגוריה:שליפת נתונים]]

גרסה אחרונה מ־20:52, 3 באוגוסט 2022