Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MySQL: Geburtstage in den nächsten 30 Tagen

Empfohlene Antworten

Hallo Leute,

ich habe folgendes Problem...

In einer Tabelle stehen Name und Geburtstag (YYYY-MM-DD)

ich möchte nun die nächsten Geburtstage anzeigen lassen.

So mache ich es bisher:

select DATE_FORMAT(geburtstag, '%d.%m.%Y') as geburtstag, name, vname from spieler where DATE_FORMAT(geburtstag, '%m') = MONTH(now()) and DATE_FORMAT(geburtstag, '%d.%m') >= DATE_FORMAT(now(), '%d.%m') order by geburtstag

Damit werden alle Geburtstage angezeigt, die in diesem Monat liegen und noch nicht vorbei sind.

Jetzt möchte ich das ganze so anpassen, das alle Geburtstag in den

nächsten 30 Tagen angezeigt werden.

Mit Timestamp rechnen geht das ja nicht, wegen der unterschiedlichen Jahre.

(Geburtsjahr -- Aktuelles Jahr)

hat jemand eine Idee, wie man das lösen kann?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.