Difference between revisions of "SalesRow/GetLast"
From Sega Retro
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: | + | {{#vardefine:lastchartdate|{{#var:lastdate}}}} |
− | {{#cargo_query: | + | |
+ | {{#vardefine:last|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}}||{{#vardefine:last|re-entry}}}}|}} |
</div></includeonly><noinclude> | </div></includeonly><noinclude> | ||
Revision as of 15:57, 4 May 2022
20020600