ph91.de
  • Home
  • About me
  • Categories
    • Software Development
    • New Zealand
    • Music
    • Tech & IT
    • Sports
    • Dublin
    • Junk
  • Contact
  • Disclaimer
ph91.de
ph91.de
  • Home
  • About me
  • Categories
    • Software Development
    • New Zealand
    • Music
    • Tech & IT
    • Sports
    • Dublin
    • Junk
  • Contact
  • Disclaimer
  • Software Development

wpDataTables Hack: Default to current year

  • 23. January 2021
  • Philipp

For speed-kini.de we have two types of tables:

  1. Tables which show the current rankings overall, women, juniors, foil..
  2. 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%)

[...]

Related Topics
  • speed-kini
  • wordpress
  • wpDataTables
Philipp

Previous Article
action adventure beach clouds
  • Software Development

Creating “Windwarner”

  • 2. January 2021
  • Philipp
View Post
7,180 comments

Comments navigation

Older comments
Newer comments
  1. Raymundo Rackers says:
    28. October 2025 at 00:46

    expandyourhorizon – Always a pleasure to read, informative and well-written content.

  2. Lunarfireok3duaft says:
    28. October 2025 at 00:47

    Je suis epate par Sugar Casino, ca offre un plaisir vibrant. Il y a un eventail de titres captivants, incluant des options de paris sportifs dynamiques. Avec des depots instantanes. Le suivi est impeccable. Les gains sont transferes rapidement, par contre quelques spins gratuits en plus seraient top. En bref, Sugar Casino est une plateforme qui fait vibrer. Pour ajouter le site est rapide et engageant, apporte une touche d’excitation. Un point fort les paiements en crypto rapides et surs, garantit des paiements securises.
    Rejoindre maintenant|

  3. Lunarfireok3duaft says:
    28. October 2025 at 00:48

    Je suis accro a Sugar Casino, on y trouve une vibe envoutante. Le catalogue de titres est vaste, proposant des jeux de table sophistiques. 100% jusqu’a 500 € plus des tours gratuits. Les agents repondent avec efficacite. Les transactions sont toujours fiables, de temps en temps plus de promos regulieres ajouteraient du peps. Pour faire court, Sugar Casino vaut une exploration vibrante. A souligner la plateforme est visuellement dynamique, donne envie de continuer l’aventure. Egalement top les paiements en crypto rapides et surs, cree une communaute soudee.
    Visiter la page web|

  4. toxickingen6duaft says:
    28. October 2025 at 01:01

    J’adore l’ambiance electrisante de Ruby Slots Casino, on ressent une ambiance festive. Les options de jeu sont incroyablement variees, offrant des sessions live immersives. Le bonus initial est super. Le support est rapide et professionnel. Le processus est fluide et intuitif, de temps en temps plus de promotions frequentes boosteraient l’experience. Dans l’ensemble, Ruby Slots Casino vaut une visite excitante. Notons egalement la plateforme est visuellement electrisante, booste l’excitation du jeu. A souligner le programme VIP avec des privileges speciaux, qui dynamise l’engagement.
    Lire les dГ©tails|

  5. toxickingen6duaft says:
    28. October 2025 at 01:02

    J’adore l’energie de Ruby Slots Casino, ca offre une experience immersive. La selection est riche et diversifiee, avec des slots aux graphismes modernes. Le bonus d’inscription est attrayant. Le support est fiable et reactif. Les transactions sont toujours securisees, parfois plus de promos regulieres dynamiseraient le jeu. Pour conclure, Ruby Slots Casino offre une experience hors du commun. Par ailleurs le design est style et moderne, permet une plongee totale dans le jeu. Particulierement fun les transactions en crypto fiables, garantit des paiements rapides.
    http://www.rubyslotscasinologinfr.com|

  6. Georgedut says:
    28. October 2025 at 01:07

    https://t.me/bs_1Win/566

  7. vibeknightan1duaft says:
    28. October 2025 at 01:09

    J’adore le dynamisme de Sugar Casino, ca offre un plaisir vibrant. La selection de jeux est impressionnante, incluant des paris sportifs pleins de vie. 100% jusqu’a 500 € plus des tours gratuits. Le support est pro et accueillant. Les retraits sont lisses comme jamais, rarement quelques free spins en plus seraient bienvenus. En conclusion, Sugar Casino est un immanquable pour les amateurs. Ajoutons aussi la plateforme est visuellement electrisante, facilite une immersion totale. Particulierement cool les evenements communautaires engageants, garantit des paiements rapides.
    Explorer la page|

  8. stati o marketinge _knpt says:
    28. October 2025 at 01:09

    интернет маркетинг статьи интернет маркетинг статьи .

  9. vibeknightan1duaft says:
    28. October 2025 at 01:10

    J’ai un veritable coup de c?ur pour Sugar Casino, ca pulse comme une soiree animee. Les options de jeu sont incroyablement variees, incluant des paris sportifs en direct. Il rend le debut de l’aventure palpitant. Le support est rapide et professionnel. Les transactions sont toujours securisees, rarement des recompenses supplementaires seraient parfaites. Pour conclure, Sugar Casino est une plateforme qui fait vibrer. Par ailleurs la plateforme est visuellement vibrante, ajoute une touche de dynamisme. Un bonus les options de paris sportifs diversifiees, offre des recompenses continues.
    Visiter en ligne|

  10. stati o marketinge _obpt says:
    28. October 2025 at 01:12

    блог про seo [url=https://statyi-o-marketinge7.ru]блог про seo[/url] .

  11. MichaelSciet says:
    28. October 2025 at 01:15

    Капельницы в «ЧелМед Детокс» — это модульная конструкция, а не «микс на удачу». База — регидратация и коррекция электролитов. По показаниям добавляются антиэметики, антивегетативные средства, поддержка метаболизма, витамины группы B, магний. Отдельным блоком идёт ночной модуль: задача — собрать восстановительный сон, не «перелечивая» пациента. Каждый модуль имеет свою цель и стоп-критерий. Врач избегает одновременного запуска нескольких новых элементов, чтобы видеть причинно-следственную связь и точно понимать, что именно работает у конкретного человека.
    Разобраться лучше – нарколог на дом вывод из запоя

  12. Karlyn Heckford says:
    28. October 2025 at 01:25

    inkorswimtattoocruise – Content is fresh, practical, and engaging for anyone working at home.

  13. Mika Solinski says:
    28. October 2025 at 01:31

    lotsofonlinepeople – I enjoy the variety of topics covered here regularly.

  14. Renaldo Chamberlain says:
    28. October 2025 at 01:32

    oldschoolopen – Really helpful tips here, saved me hours of unnecessary work.

  15. Desmond Sweers says:
    28. October 2025 at 01:33

    chopchopgrubshop – Friendly staff and a cozy atmosphere make dining enjoyable.

  16. Lurline Flakes says:
    28. October 2025 at 01:34

    letter4reform – Engaging articles that challenge conventional views on societal issues.

  17. stati o marketinge _zqpt says:
    28. October 2025 at 01:36

    оптимизация сайта блог оптимизация сайта блог .

  18. stati o marketinge _hhpt says:
    28. October 2025 at 01:38

    материалы по seo материалы по seo .

  19. Emanuel Maza says:
    28. October 2025 at 01:41

    zz-meta – Found some great resources here, really helpful for beginners.

  20. Leonardo Aguiler says:
    28. October 2025 at 01:49

    chopchopgrubshop – The ambiance complements the flavorful dishes perfectly, creating a memorable experience.

  21. đếm ngược ngày thi says:
    28. October 2025 at 01:51

    Chờ ngày đặc biệt? app đếm ngược ngày sinh nhật cho phép cá nhân hóa màu sắc, hình nền, và chia sẻ đường link đếm ngược cho bạn bè.

  22. WyattCrurl says:
    28. October 2025 at 01:56

    Курс терапии в клинике состоит из нескольких последовательных этапов, каждый из которых направлен на достижение конкретных целей — от снятия интоксикации до восстановления психологического равновесия. Такой подход позволяет добиться устойчивого результата и минимизировать вероятность рецидива. На всех стадиях лечения ведётся контроль состояния пациента, а также постоянная корректировка назначений в зависимости от реакции организма.
    Узнать больше – http://narkologicheskaya-clinika-v-kazani16.ru/chastnaya-narkologicheskaya-klinika-kazan/

  23. Lazaro Vatter says:
    28. October 2025 at 02:02

    ieeb – Always a pleasure to read, informative and well-written articles.

  24. Christinia Shuford says:
    28. October 2025 at 02:03

    ieeb – A must-visit site for anyone interested in diverse subjects.

  25. ThomasArove says:
    28. October 2025 at 02:04

    Поэтапный подход помогает достичь устойчивых результатов и минимизировать вероятность рецидива, обеспечивая безопасность пациента на всех стадиях лечения.
    Подробнее тут – http://narkologicheskaya-clinika-v-samare16.ru/chastnaya-narkologicheskaya-klinika-samara/

  26. Chiquita Behrends says:
    28. October 2025 at 02:05

    broodbase – A must-visit site for anyone interested in diverse subjects.

  27. Sammy Ryant says:
    28. October 2025 at 02:06

    lastminute-corporate – Regular updates and promotions provide added value for corporate clients.

  28. Marni Forejt says:
    28. October 2025 at 02:07

    kazhanmaster – I find their perspectives unique and refreshing, highly informative.

  29. Georgedut says:
    28. October 2025 at 02:16

    https://t.me/s/bs_1Win/643

  30. Nicolasnum says:
    28. October 2025 at 02:18

    Реабилитация проходит в комфортных условиях, с постоянным наблюдением специалистов. Важным элементом является формирование новых привычек и социальных навыков, что способствует возвращению пациента к полноценной жизни.
    Выяснить больше – http://narkologicheskaya-clinika-v-nizhnem-novgorode16.ru

  31. wedding_qher says:
    28. October 2025 at 02:20

    When designing wedding invitations, many couples use personalized wedding stamps, to add personality and flair to your special invitations.
    Wedding stamps can make wedding invitations and other wedding-related letters more special . They come in a variety of designs and styles, from traditional to modern Wedding stamps can be found in many different designs and styles, from traditional to modern . Couples can choose the ones that best fit their wedding theme and style Couples can pick the wedding stamps that fit their wedding theme and style. Wedding stamps can also be customized with the couple’s names, wedding date, and other personal details Wedding stamps can be customized with the couple’s names, wedding date, and other special details.

    Wedding stamps are not only beautiful but also meaningful Wedding stamps have a special significance in addition to their beauty . They symbolize the union of two people and the beginning of their new life together The union of two people is symbolized by wedding stamps, marking the beginning of their new life . Couples can use them to send thank-you notes, invitations, and other wedding-related correspondence Wedding stamps can be used by couples to send invitations, thank-you notes, and other wedding-related letters . Wedding stamps can also be collected as a keepsake Wedding stamps can be saved as a souvenir.

    The history of wedding stamps dates back to the mid-20th century The origins of wedding stamps can be traced back to the mid-20th century. The first wedding stamps were introduced by the United States Postal Service The United States Postal Service introduced the first wedding stamps . They were designed to commemorate special occasions such as weddings and anniversaries Wedding stamps were initially designed to celebrate special occasions, such as weddings and anniversaries. Since then, wedding stamps have become a popular way to celebrate weddings Over time, wedding stamps have become a common way to commemorate weddings .

    The designs of wedding stamps have evolved over the years Wedding stamp designs have evolved over the years . From traditional to modern, there are many different designs to choose from There are many different designs to choose from, ranging from traditional to modern . Some wedding stamps feature romantic landscapes, while others feature beautiful floral arrangements Some wedding stamps have romantic landscapes, while others have beautiful flowers. Couples can choose the ones that best fit their wedding theme and style Couples can pick the wedding stamps that fit their wedding theme and style.

    There are many different types of wedding stamps available Wedding stamps come in many different types . Some are designed specifically for wedding invitations, while others are designed for thank-you notes and other correspondence Wedding stamps can be used for wedding invitations, thank-you notes, and other wedding-related letters . Couples can also choose from a variety of shapes and sizes There are many different shapes and sizes of wedding stamps available. Some wedding stamps are heart-shaped, while others are square or circular Some wedding stamps are heart-shaped, while others are square or round.

    Wedding stamps can also be customized with the couple’s names, wedding date, and other personal details Wedding stamps can be customized with the couple’s names, wedding date, and other special details. This makes them a unique and meaningful way to commemorate the wedding This makes them a special and meaningful way to commemorate the wedding . Couples can use them to send invitations, thank-you notes, and other wedding-related correspondence Couples can use wedding stamps to send invitations, thank-you notes, and other wedding-related mail .

    In conclusion, wedding stamps are a beautiful and meaningful way to add a personal touch to wedding invitations and other wedding-related correspondence To conclude, wedding stamps are a beautiful way to make wedding invitations and other wedding-related letters more special. They come in a variety of designs and styles, and can be customized with the couple’s names, wedding date, and other personal details Wedding stamps can be found in many different designs and styles, and can be customized with personal details . Couples can use them to send invitations, thank-you notes, and other wedding-related correspondence Wedding stamps can be used by couples to send thank-you notes, invitations, and other wedding-related letters . Wedding stamps are a unique and meaningful way to commemorate the wedding Wedding stamps are a special and meaningful way to commemorate the wedding .

    Overall, wedding stamps are a wonderful way to make the wedding planning process more special and meaningful In general, wedding stamps are a lovely way to make the wedding planning process more personal and memorable. They can be used in many different ways, from sending invitations to decorating the wedding album Wedding stamps can be used for many different purposes, including sending invitations and decorating the wedding album . Couples can choose the wedding stamps that best fit their wedding theme and style Couples can choose the wedding stamps that best fit their wedding theme and style . By using wedding stamps, couples can add a personal touch to their wedding and make it even more special and memorable By using wedding stamps, couples can add a personal touch to their wedding and make it even more special and memorable .

  32. CraigVex says:
    28. October 2025 at 02:25

    В первые два часа после прибытия бригады важно не «сделать побольше», а принять наименьшее количество решений, которое реально меняет картину. Команда фиксирует базовую линию (ЧСС, АД, SpO?, температура, шкала тошноты/тремора), даёт антиеметический мост и запускает регидратацию. При тахикардии — добавляет антивегетативный контур. Семья получает сценарий ночи: когда приглушить свет, когда предложить воду, какие цифры на тонометре считать нормой и при каких — звонить. Такой протокол экономит время и силы, а главное — превращает вечер из хаотичного в управляемый, снижая риск ночных экстренных вызовов и «эмоциональных качелей».
    Получить больше информации – капельницы от запоя на дому цена в челябинске

  33. JamesNom says:
    28. October 2025 at 02:25

    Наши стандарты включают конфиденциальную маршрутизацию, детализированные инструкции для семьи, модульный план лечения и прозрачное разделение бесплатных и платных блоков. Каждому пациенту назначается ведущий специалист, который сопровождает его на всём пути — от первого звонка до контрольных чек-инов после процедур. Мы не «наращиваем» объём вмешательств ради впечатления: используется минимально достаточный набор мер, который действительно влияет на целевые маркеры — переносимость воды, качество сна, сглаживание вегетативных «качелей» и возвращение утренней ясности.
    Подробнее тут – https://narkologicheskaya-klinika-v-chelyabinske16.ru/chastnaya-narkologicheskaya-klinika-chelyabinsk/

  34. stati o marketinge _fupt says:
    28. October 2025 at 02:41

    контекстная реклама статьи контекстная реклама статьи .

  35. Don Vanbogelen says:
    28. October 2025 at 02:45

    sjydtech – The name feels unique, definitely stands out and sparks curiosity.

  36. Kaleigh Haghighi says:
    28. October 2025 at 03:03

    conorjmurphy – Found exactly what I needed, instructions were clear and concise.

  37. RobertRiz says:
    28. October 2025 at 03:08

    Поэтапное лечение помогает врачам контролировать процесс восстановления и своевременно корректировать терапию в зависимости от состояния пациента.
    Получить дополнительные сведения – наркологическая клиника стационар в самаре

  38. Nicolasnum says:
    28. October 2025 at 03:15

    Лечение зависимости требует комплексного подхода, включающего медицинские, психологические и социальные меры. Каждый пациент проходит индивидуальную диагностику, по результатам которой подбирается схема терапии. Такой подход позволяет снизить риски осложнений и обеспечить стабильный результат.
    Получить дополнительную информацию – https://narkologicheskaya-clinika-v-nizhnem-novgorode16.ru/narkolog-nizhnij-novgorod-na-dom

  39. Georgedut says:
    28. October 2025 at 03:26

    https://t.me/s/bs_1Win/639

  40. Anthonyagosy says:
    28. October 2025 at 03:26

    Мы придерживаемся инженерной логики: цель > маркер > окно проверки > отключение модуля. Никаких «сильных коктейлей на всякий случай»: сначала один точный шаг, затем — проверка результата. Именно так формируется прозрачность и доверие: пациент видит причину каждого назначения и понимает момент его завершения. Это уменьшает тревогу, ускоряет восстановление и убирает «инерцию лечения», когда лишние вмешательства продолжаются просто по привычке.
    Узнать больше – http://narkolog-na-dom-v-samare16.ru

  41. MichaelSciet says:
    28. October 2025 at 03:35

    Капельницы в «ЧелМед Детокс» — это модульная конструкция, а не «микс на удачу». База — регидратация и коррекция электролитов. По показаниям добавляются антиэметики, антивегетативные средства, поддержка метаболизма, витамины группы B, магний. Отдельным блоком идёт ночной модуль: задача — собрать восстановительный сон, не «перелечивая» пациента. Каждый модуль имеет свою цель и стоп-критерий. Врач избегает одновременного запуска нескольких новых элементов, чтобы видеть причинно-следственную связь и точно понимать, что именно работает у конкретного человека.
    Исследовать вопрос подробнее – вывод из запоя капельница на дому челябинск

  42. Briancreno says:
    28. October 2025 at 03:37

    Реабилитационные мероприятия в клинике направлены на устранение соматических последствий зависимости, нормализацию когнитивных функций и восстановление социальной адаптации. Для этого используются современные методики физиотерапии, диетологической коррекции и психологического сопровождения, позволяющие закрепить достигнутые результаты лечения.
    Подробнее – запой наркологическая клиника санкт-петербург

  43. JosephCok says:
    28. October 2025 at 03:39

    Весь процесс можно представить следующим образом:
    Изучить вопрос глубже – нарколог на дом анонимно челябинск

  44. TravisSlota says:
    28. October 2025 at 03:52

    Ниже — сводный ориентир по этапам. Это не жёсткий график, а понятная канва процесса, которую врач адаптирует под клиническую картину.
    Получить дополнительные сведения – http://narkolog-na-dom-voskresensk8.ru

  45. PalmerDew says:
    28. October 2025 at 03:54

    Чтобы сделать процесс понятным и управляемым, каждый шаг сопровождается измеримыми маркерами безопасности и эффективности. Корректировки — точечные, по правилу «одного изменения», что позволяет видеть вклад каждого действия и сохранять переносимость.
    Получить дополнительные сведения – наркологическая психиатрическая помощь в казани

  46. Bernardjoign says:
    28. October 2025 at 04:00

    Сочетание медицинских и психотерапевтических мер создаёт устойчивую систему поддержки. Пациенты получают возможность постепенно восстановить утраченное здоровье и психологическую стабильность.
    Выяснить больше – наркологическая клиника казань

  47. MartyJex says:
    28. October 2025 at 04:04

    Мы работаем последовательностями, которые реально влияют на исход: допуск к терапии, инфузии с коррекцией электролитов и КЩС, поддержка органов-мишеней, профилактика осложнений, осторожная нормализация сна по показаниям, переоценка и настройка схемы, план на неделю с алгоритмами «если-то». Важно не «перелечивать»: избыточная седативная нагрузка опасна так же, как и её отсутствие. Поэтому темп и состав мы настраиваем под текущие параметры и динамику — и объясняем пациенту и семье, зачем именно выбран каждый шаг.
    Получить больше информации – наркологическая клиника клинский район

  48. GeorgeTek says:
    28. October 2025 at 04:16

    Актуальный список промокодов в Мелбет при регистрации в 2026 году. Действующий бонус код для новичков и постоянных пользователей. Актуальный промокод в Melbet на фрибет. В Melbet подарки ждут каждого зарегистрированного пользователя. Для новичков подготовлены бонусы за первую регистрацию. Постоянные клиенты могут получать поощрения в акциях и бонусных программах. Промокоды бк Мелбет позволяет игрокам принимать участие в акциях и получать разные поощрения, к примеру, бесплатные ставки. В нашей статье мы узнаем, где взять Мелбет промокод фрибет, как его применять при создании аккаунта и ставках. 

  49. ThomasArove says:
    28. October 2025 at 04:31

    Первым шагом терапии является детоксикация — процедура очищения организма от продуктов распада алкоголя или наркотических веществ. Она проводится под контролем врача и помогает стабилизировать работу сердечно-сосудистой системы, печени и центральной нервной системы. Для поддержания здоровья используются инфузионные растворы, витамины, гепатопротекторы и препараты, снижающие тревожность.
    Подробнее можно узнать тут – анонимная наркологическая клиника в самаре

  50. Anthonyagosy says:
    28. October 2025 at 04:32

    Корректная среда — половина успешной инфузии. Этот порядок действий помогает врачу быстрее принять решения, а пациенту — легче перенести первые часы.
    Разобраться лучше – нарколог на дом цены

Comments navigation

Older comments
Newer comments

Leave a Reply

Your email address will not be published. Required fields are marked *

ph91.de
Blog by Philipp Schreitmüller

Input your search keywords and press Enter.