Jump to content

Archived

This topic is now archived and is closed to further replies.

chery

display birthdays this month

Recommended Posts

I would like a php to display any 'username' who is having a birthday this calendar month with data retrieved from my db. The field is called birth_date and displays the dates like this: '1980-05-07'.
Thank you for your help.

Share this post


Link to post
Share on other sites
[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']SELECT[/span] username [color=green]FROM[/color] [color=orange]users[/color] [color=green]WHERE[/color] MONTH(birth_date)[color=orange]=[/color]MONTH(NOW()) [!--sql2--][/div][!--sql3--]

Share this post


Link to post
Share on other sites
[!--quoteo(post=376075:date=May 22 2006, 12:34 PM:name=ryanlwh)--][div class=\'quotetop\']QUOTE(ryanlwh @ May 22 2006, 12:34 PM) [snapback]376075[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']SELECT[/span] username [color=green]FROM[/color] [color=orange]users[/color] [color=green]WHERE[/color] MONTH(birth_date)[color=orange]=[/color]MONTH(NOW()) [!--sql2--][/div][!--sql3--]
[/quote]


But how do I display it on my webpage?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.