Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- get members who have birthday this week
June 29, 2011, 9:20 pm
rate this thread
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?
Re: get members who have birthday this week
This is a MySQL question, not a PHP one (hint: PHP knows NOTHING about SQL).
I would suggest you ask in comp.databases.mysql.
Remove the "x" from my email address
JDS Computer Training Corp.