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