FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » get members who have birthday this week
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
get members who have birthday this week [message #174728] Wed, 29 June 2011 21:20 Go to previous message
Co is currently offline  Co
Messages: 75
Registered: May 2011
Karma:
Member
Hi All,

I want to display all members who have their birthday the coming week.
I tried some code but it doesn't return any records. Probably because
it looks for the date of birth
instead of just the month and day:

$today = date("d-m-Y");
$birthday = $row['birthday'];

$sql = mysql_query("SELECT * FROM myMembers WHERE birthday BETWEEN
$today AND $today+7");

Can anyone help me out here?

Marco
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: how to unset session variable when leaving page
Next Topic: Windows binaries for the SAM (Simple Asynchronous Messaging for PHP) extension
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 08:29:46 GMT 2024

Total time taken to generate the page: 0.04186 seconds