For speed-kini.de we have two types of tables:
- Tables which show the current rankings overall, women, juniors, foil..
- Tables which show rankings of previous years (archive) for overall, women, juniors, foil…
The initial approach was having two different wpDataTables: one for the current year and one with the year as variable. This duplication should ring all your software engineer alarm bells!
Another possibility would have been to use the archive tables for the current rankings by just setting the variable to 2021, 2022 etc… this would mean work every year to edit the wordpress pages and manually increase the variable to the current year. So this is a bit nicer but still means regular maintenance work.
After some thought, I ended up with a neat approach how to use one table for both: current and archive.
For the current year you just leave the variable empty and for archive you specify the variable to your desired year.
The mechanism to default to the current year in case no year is specified consists of two parts:
#1 Setting the default value of %VAR1% to a very high number (> 5000 should be enough 😉 )
#2 Small SQL modifications to the places which use %VAR1%
[...]
WHERE
YEAR(date) = LEAST(year(curdate()), %VAR1%)
[...]
153 comments
Пытаетесь разнообразить своё питание необычными вкусами? Мы подскажем, как это сделать!
Особенно понравился раздел про Как специи изменяли мировую историю и экономику.
Вот, делюсь ссылкой:
https://localflavors.ru/%d1%81%d0%bf%d0%b5%d1%86%d0%b8%d0%b8-%d0%ba%d0%be%d1%82%d0%be%d1%80%d1%8b%d0%b5-%d0%b8%d0%b7%d0%bc%d0%b5%d0%bd%d0%b8%d0%bb%d0%b8-%d1%85%d0%be%d0%b4-%d0%b8%d1%81%d1%82%d0%be%d1%80%d0%b8%d0%b8/
Теперь вам осталось только отправиться в магазин за экзотикой. Приятных покупок!
Пытаетесь разнообразить своё питание необычными вкусами? Мы подскажем, как это сделать!
Кстати, если вас интересует Исследуем локальные деликатесы со всего мира, загляните сюда.
Ссылка ниже:
https://localflavors.ru/%d0%bb%d0%be%d0%ba%d0%b0%d0%bb%d1%8c%d0%bd%d1%8b%d0%b5-%d0%b4%d0%b5%d0%bb%d0%b8%d0%ba%d0%b0%d1%82%d0%b5%d1%81%d1%8b-%d1%80%d0%b0%d0%b7%d0%bd%d1%8b%d1%85-%d0%ba%d0%be%d0%bd%d1%82%d0%b8%d0%bd%d0%b5/
До новых встреч в мире экзотики!
Ищете, как быстро подарить радость?
заказать цветы СЃ доставкой – отличная статья на эту тему.
Это современное решение качества.
Советуем прочитать о том, как быстро оформить заказ.
Доставка осуществляется по Москве и области, а букеты выглядят как на фото.
Не упустите шанс подарить радость просто и удобно!