23,840
עריכות
(מחזלשים את הdatepicker) תגית: שוחזרה |
אין תקציר עריכה תגית: שחזור ידני |
||
שורה 1: | שורה 1: | ||
{{#vardefine:whereclause| | {{#vardefine:whereclause| | ||
liga IS NOT NULL AND liga='{{{ליגה}}}' | liga IS NOT NULL AND liga='{{{ליגה}}}' | ||
שורה 7: | שורה 5: | ||
{{#ifeq:{{{ביתיות}}}|(הכל)|| AND homegame='{{{ביתיות}}}' }} | {{#ifeq:{{{ביתיות}}}|(הכל)|| AND homegame='{{{ביתיות}}}' }} | ||
{{#ifeq:{{{יריבה}}}|(הכל)|| AND (Games.host='{{החלפת שם יריב שאילתא|יריבה={{{יריבה|}}}}}' OR Games.oponent='{{החלפת שם יריב שאילתא|יריבה={{{יריבה|}}}}}')|}} | {{#ifeq:{{{יריבה}}}|(הכל)|| AND (Games.host='{{החלפת שם יריב שאילתא|יריבה={{{יריבה|}}}}}' OR Games.oponent='{{החלפת שם יריב שאילתא|יריבה={{{יריבה|}}}}}')|}} | ||
{{# | {{#if: {{{StartDate|}}} | AND STR_TO_DATE(CONCAT(Games.year,'-',Games.month, '-', Games.day), '%Y-%m-%d') >= "{{{StartDate}}}" }} | ||
{{# | {{#if: {{{EndDate|}}} | AND STR_TO_DATE(CONCAT(Games.year,'-',Games.month, '-', Games.day), '%Y-%m-%d') <= "{{{EndDate}}}" }} | ||
{{#ifeq:{{{מפעל}}}|(הכל)| AND liga='{{{ליגה}}}' {{#ifeq:{{{ליגה}}}|1|GROUP BY liga|GROUP BY MIFAL}}|{{#ifeq:{{{מפעל}}}|ליגה| AND liga='1' GROUP BY liga | AND mifal='{{#replace:{{{מפעל}}}|'|\'}}' GROUP BY mifal }} }} | {{#ifeq:{{{מפעל}}}|(הכל)| AND liga='{{{ליגה}}}' {{#ifeq:{{{ליגה}}}|1|GROUP BY liga|GROUP BY MIFAL}}|{{#ifeq:{{{מפעל}}}|ליגה| AND liga='1' GROUP BY liga | AND mifal='{{#replace:{{{מפעל}}}|'|\'}}' GROUP BY mifal }} }} | ||
}}{{#cargo_query: | }}{{#cargo_query: | ||
tables=Games | 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, | |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:whereclause}} | |where={{#var:whereclause}} | ||
|format=template | |format=template |
עריכות