x
 
Create New Page
 View Previous Changes    ( Last updated by CDT )

Displaying Member Birthdays

I was having a little trouble with the Birthday plug-in, so I created a query to do it.  It’s simple, using the user’s “current time” to condition on birthday month. 

The first query displays a list of all the birthdays for the month. 

The second query performs a match on today’s birthdays.

<h2 class="sidetitle">{current_time format="%F"} Birthdays</h2>

{exp:query sql="SELECT screen_name, bday_d, bday_m FROM exp_members WHERE bday_m =  '{current_time format="%n"}' ORDER BY bday_m ASC "}

{screen_name}
{current_time format="%F"} {bday_d}<br />

{/exp:query}


{exp
:query sql="SELECT screen_name, bday_d, bday_m FROM exp_members WHERE bday_m =  '{current_time format="%n"}' AND bday_d = '{current_time format="%j"}'  ORDER BY bday_m ASC "}

<br /><b>Happy Birthday{screen_name}!</b><br />

{/exp:query} 

Category:Members

Category:EE1

Categories: