chery Posted May 22, 2006 Share Posted May 22, 2006 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. Link to comment https://forums.phpfreaks.com/topic/10191-display-birthdays-this-month/ Share on other sites More sharing options...
ryanlwh Posted May 22, 2006 Share Posted May 22, 2006 [!--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--] Link to comment https://forums.phpfreaks.com/topic/10191-display-birthdays-this-month/#findComment-37988 Share on other sites More sharing options...
chery Posted May 22, 2006 Author Share Posted May 22, 2006 [!--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? Link to comment https://forums.phpfreaks.com/topic/10191-display-birthdays-this-month/#findComment-37992 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.