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