CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 [RESOLVED] Select by current date

Print topic Send  topic

Author Message
Gery_Atric


Posts: 7
Posted: 08/13/2009, 1:16 PM

I would like to make a selection from D-B table based on the current date ,
lets say I have a 1000 dates of birth in my table and I want to display who's birthday it is to day .bearing in mind I can only use the day and month like so dd/mm .

My fields are name , birthday , current_date.

so how would I formulate my where clause .

thanks

GERY
View profile  Send private message
damian

Posts: 838
Posted: 08/13/2009, 5:44 PM

http://forums.codecharge.com/posts.php?post_id=64203&s_keyword=birthday

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
Gery_Atric


Posts: 7
Posted: 08/14/2009, 10:03 AM

Thanks for the reply damian

I have played around with your birthday code and come up with this .

I am using sql as my Data Source so here is the select

SELECT member_name, dob from members WHERE dayofmonth(dob) >=dayofmonth(now()) AND month(dob) = month(now())

This returns all dates from now() "today" to the end of the current month ,
Now how could I refine it to return today only .

thanks again for your help

GERY




View profile  Send private message
Gery_Atric


Posts: 7
Posted: 08/14/2009, 3:33 PM

Cracked it with the following

SELECT member_name, dob from 'members' WHERE dayofmonth('dob') >=dayofmonth(now()) AND month('dob') = month(now())
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.