Difference between revisions of "SalesRow/GetLast"
From Sega Retro
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div style="display:none;">{{#vardefine:last|0}}{{#vardefine:lastdate|0}}{{#cargo_query: | <includeonly><div style="display:none;">{{#vardefine:last|0}}{{#vardefine:lastdate|0}}{{#cargo_query: | ||
+ | table=salescharts | ||
+ | |fields=position,date | ||
+ | |where=chartname="{{{chartname|{{PAGENAME}}}}}" and date < {{#var:currentdate}} | ||
+ | |order by=date DESC | ||
+ | |format=template | ||
+ | |template=SalesRow/GetLast/Cargo | ||
+ | }} | ||
+ | {{#vardefine:lastchartdate|{{#var:lastdate}}}} | ||
+ | |||
+ | {{#vardefine:last|0}}{{#vardefine:lastdate|0}}{{#cargo_query: | ||
table=salescharts | table=salescharts | ||
|fields=position,date | |fields=position,date | ||
Line 6: | Line 16: | ||
|format=template | |format=template | ||
|template=SalesRow/GetLast/Cargo | |template=SalesRow/GetLast/Cargo | ||
− | }}</div></includeonly><noinclude> | + | }} |
+ | |||
+ | {{#ifexpr:{{#var:lastchartdate}} > 0|{{#ifeq:{{#var:lastdate}}|{{#var:lastchartdate}}||{{#ifexpr:{{#var:last}}>0|{{#vardefine:last|re-entry}}}}}}|}} | ||
+ | </div></includeonly><noinclude> | ||
Latest revision as of 16:03, 4 May 2022
20020600