PHP 2x Datum vergleichen + SWF Upload

Coach

Aktives Mitglied
Hallo,

ich hab Geburtstage in der Form 2004-03-12 und möchte diese nun mit dem aktuellen Datum vergleichen. Daraus möchte ich dann eine Liste erstellen erstellen, die mir die Geburtstage in den nächsten 30 Tagen ausgibt.
Wie realisiere ich sowas?

Ok, ich hab ersteres glaub ich raus:

SELECT b.USER_NAME,b.USER_BIRTHDAY FROM system_user_friends AS a LEFT JOIN system_user_data AS b ON a . FRIEND_ID =b . USER_ID WHERE REPLACE(USER_BIRTHDAY , LEFT(USER_BIRTHDAY , 4 ), IF(REPLACE(USER_BIRTHDAY , LEFT(USER_BIRTHDAY , 4 ), YEAR(NOW()))<NOW(), YEAR(NOW())+1 , YEAR(NOW())))BETWEEN NOW()AND NOW()+INTERVAL 60 DAY AND USER_BIRTHDAY !='0000-00-00' AND a . USER_ID = '6' ORDER BY
Month(USER_BIRTHDAY)*32+Dayofmonth(USER_BIRTHDAY) < Month(Curdate())*32+Dayofmonth(Curdate()), Month(USER_BIRTHDAY)*32+Dayofmonth(USER_BIRTHDAY)

Falls das einfacher geht, bitte mal erklären ;-)

Und dann noch ne Frage zum SWF Upload:
Ich möchte dem Flashupload noch 2 Formularfelder mit übergeben.
Wollte das über getelementbyid machen, das klappt aber net :-(
 
Ich würde es so machen, sollte bei dir auch möglich sein:

CODE SELECT * FROM tabelle WHERE gebdatum > NOW() AND gebdatum < (NOW() + INTERVAL 30 DAY) ORDER BY gebdatum


Dabei ist es sogar egal, ob das Geburtsdatum (hier: gebdatum) als reiner Text oder als Date-Feld abgespeichert ist, sofern auch bei Text das Format immer korrekt ist...
 
Zurück
Oben