|
|
שורה 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:{{{מפעל}}}|'|\'}}' GROUP BY mifal }} }}
| |
| }}
| |
|
| |
| {{#var:tablewhereclause}}
| |
| {| border="1" cellpadding="2" cellspacing="0" align="middle" | | {| border="1" cellpadding="2" cellspacing="0" align="middle" |
| |- style="background:#FF0000;" | | |- style="background:#FF0000;" |
שורה 20: |
שורה 8: |
| !הפסדים | | !הפסדים |
| !הפרש | | !הפרש |
| |- | | |-{{#ifeq:{{{מפעל}}}|ליגה|{{שליפת נתוני משחקים|מחלקה={{{מחלקה}}}|ליגה=1|מפעל={{{מפעל}}}|יריבה={{{יריבה}}}|תוצאה={{{תוצאה}}}|ביתיות={{{ביתיות}}}||מתאריך={{{מתאריך}}}|עדתאריך={{{עדתאריך}}}}}|{{#ifeq:{{{מפעל}}}|(הכל)|{{שליפת נתוני משחקים|מחלקה={{{מחלקה}}}|ליגה=1|מפעל={{{מפעל}}}|יריבה={{{יריבה}}}|תוצאה={{{תוצאה}}}|ביתיות={{{ביתיות}}}||{{#var:start}}|עדתאריך={{{עדתאריך}}}}}|}}}}{{שליפת נתוני משחקים|מחלקה={{{מחלקה}}}|ליגה=0|מפעל={{{מפעל}}}|יריבה={{{יריבה}}}|תוצאה={{{תוצאה}}}|ביתיות={{{ביתיות}}}||{{#var:start}}|עדתאריך={{{עדתאריך}}}}} |
| |} | | |} |
| {{#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| |