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%
[...]
WHEREYEAR(date) = LEAST(year(curdate()), %VAR1%)
[...]
37,567 comments
Nice Post. It’s really a very good article. I noticed all your important points. Thanks.
дайсон официальный сайт стайлер дайсон официальный сайт стайлер .
мелбет полная версия сайта мелбет полная версия сайта .
designdiscoverhub – DesignDiscoverHub presents well-curated items in a clean, organized interface.
бонусы казино melbet бонусы казино melbet .
мелбет официальный сайт мелбет официальный сайт .
скачать приложение мелбет ставки на спорт скачать приложение мелбет ставки на спорт .
мелбет букмекерская контора мелбет букмекерская контора .
играть в слоты играть в слоты .
вывоз мусора https://unews.pro/news/133692// .
промокод melbet промокод melbet .
онлайн школа для школьников с аттестатом https://www.shkola-onlajn1.ru .
Howdy, i read your blog from time to time and i own a
similar one and i was just wondering if you get a lot of spam responses?
If so how do you prevent it, any plugin or anything you can advise?
I get so much lately it’s driving me mad so any help is
very much appreciated.
фен купить дайсон официальный фен купить дайсон официальный .
мелбет личный кабинет мелбет личный кабинет .
щебень щебень .
Hey there! I’m at work browsing your blog from
my new iphone 3gs! Just wanted to say I love reading through your blog
and look forward to all your posts! Carry on the fantastic
work!