תבנית:שליפת טבלת משחקים שאלתא: הבדלים בין גרסאות בדף

אין תקציר עריכה
תגית: שוחזרה
אין תקציר עריכה
 
(25 גרסאות ביניים של אותו משתמש אינן מוצגות)
שורה 1: שורה 1:
[[קטגוריה:שליפת נתונים]]
{{#vardefine:tablewhereclause|
liga IS NOT NULL AND liga='{{{ליגה}}}'
{{#ifexpr:{{#len:{{{מחלקה}}}}} > 0| AND department='{{{מחלקה}}}' | AND department='whatever'}}
{{#ifeq:{{{תוצאה}}}|(הכל)| AND result<>'?' | AND result='{{{תוצאה}}}' }}
{{#ifeq:{{{ביתיות}}}|(הכל)|| AND homegame='{{{ביתיות}}}' }}
{{#ifeq:{{{יריבה}}}|(הכל)|| AND (Games.host='{{החלפת שם יריב שאילתא|יריבה={{{יריבה|}}}}}' OR Games.oponent='{{החלפת שם יריב שאילתא|יריבה={{{יריבה|}}}}}')|}}
{{#if: {{{מתאריך|}}} | AND STR_TO_DATE(CONCAT(Games.year,'-',Games.month, '-', Games.day), '%Y-%m-%d') >= '{{{מתאריך}}}' }}
{{#if: {{{עדתאריך|}}} | AND  STR_TO_DATE(CONCAT(Games.year,'-',Games.month, '-', Games.day), '%Y-%m-%d') <= '{{{עדתאריך}}}' }}
{{#ifeq:{{{מפעל}}}|(הכל)| AND liga='{{{ליגה}}}' {{#ifeq:{{{ליגה}}}|1|GROUP BY liga|GROUP BY MIFAL}}|{{#ifeq:{{{מפעל}}}|ליגה| AND liga='1' GROUP BY liga | AND mifal='{{#replace:{{{מפעל}}}|&#39;|\'}}' GROUP BY mifal }} }}
}}
{| border="1" cellpadding="2" cellspacing="0" align="middle"
{| border="1" cellpadding="2" cellspacing="0" align="middle"
|- style="background:#FF0000;"
|- style="background:#FF0000;"
שורה 19: שורה 7:
!הפסדים
!הפסדים
!הפרש
!הפרש
|-
{{!}}-{{#ifeq:{{{מפעל}}}|ליגה|{{שליפת נתוני משחקים|מחלקה={{{מחלקה}}}|ליגה=1|מפעל={{{מפעל}}}|יריבה={{{יריבה}}}|תוצאה={{{תוצאה}}}|ביתיות={{{ביתיות}}}||מתאריך={{{מתאריך}}}|עדתאריך={{{עדתאריך}}}}}|{{#ifeq:{{{מפעל}}}|(הכל)|{{שליפת נתוני משחקים|מחלקה={{{מחלקה}}}|ליגה=1|מפעל={{{מפעל}}}|יריבה={{{יריבה}}}|תוצאה={{{תוצאה}}}|ביתיות={{{ביתיות}}}||מתאריך={{{מתאריך}}}|עדתאריך={{{עדתאריך}}}}}|}}}}{{שליפת נתוני משחקים|מחלקה={{{מחלקה}}}|ליגה=0|מפעל={{קידוד למסד|טקסט={{{מפעל}}}}}|יריבה={{{יריבה}}}|תוצאה={{{תוצאה}}}|ביתיות={{{ביתיות}}}||מתאריך={{{מתאריך}}}|עדתאריך={{{עדתאריך}}}}}
|}
|}
{{#cargo_query:
tables=Games
|fields=CONCAT(case liga when '1' then 'ליגה' else mifal end),COUNT(*),SUM(case result when '1' then 1 else 0 end),SUM(case result when 'x' then 1 else 0 end),SUM(case result when '0' then 1 else 0 end),SUM(case host when 'הפועל ת"א' then homescore  else 0 end)+SUM(case oponent when 'הפועל ת"א' then awayscore else 0 end),SUM(case host when 'הפועל ת"א' then awayscore  else 0 end)+SUM(case oponent when 'הפועל ת"א' then homescore else 0 end),department,day,month,year,'{{#replace:{{{יריבה}}}|.|#}}'=against
|where={{#var:tablewhereclause}}
|format=template
|template=שורת מפגשים ראש בראש
|order by=year,month,day
|rows per page=100
|default=
}}


{{#vardefine:whereclause|
{{#vardefine:whereclause|
שורה 55: שורה 32:
|where={{#var:whereclause}}
|where={{#var:whereclause}}
|format=dynamic table
|format=dynamic table
|order by=תאריך DESC
|order by={{#ifeq:{{{סדר}}}|הפרש| ABS(Games.homescore-Games.awayscore) DESC|תאריך DESC}}
|default=
|default=
|rows per page=100
|rows per page=100
}}
}}
[[קטגוריה:שליפת נתונים]]

גרסה אחרונה מ־07:05, 29 באפריל 2024

מפעל מפגשים נצחונות תיקו הפסדים הפרש