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
Re: get members who have birthday this week [message #174729 is a reply to message #174728] Wed, 29 June 2011 21:29 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 6/29/2011 5:20 PM, Co wrote:
> 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

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
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[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 09:07:14 GMT 2024

Total time taken to generate the page: 0.05206 seconds