Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Get Upcoming Birthdays


I have a column in a mysql table which is formated as 'date' called DOB. I want to create a query that will get all birthdays cumming up in the next ten days.




View Complete Forum Thread with Replies

Related Forum Messages:
SQL Query To Retrieve Upcoming Poker Games
I need an SQL query to retrieve upcoming poker games from my database starting with today's games and including all other games for the next 7 days. At the moment I have: Code:

SELECT *
FROM tbl_todaysgames
WHERE WEEK(CURDATE()) = WEEK(date)
ORDER BY date ASC.

View Replies !
Birthdays
In a MYSQL database I have stored when the members were born in the form
"YYYYMMDD". Now I want a method to select every member who has birthday from
today and up to 30 days into the future. I would prefer if this could be
done in a MYSQL query.

Can anyone tell me how to do this? I have figured out some solutions that
will work, but unfortunately not in December because the year will turn.

View Replies !
Get The Birthdays For The Next 14 Days
I have a table of members and I have their dob. Now I want to show the members which have their birthday in the next two weeks. PHP Code:

View Replies !
Arrays, Queries, Birthdays, ...
I have this problem that I cant solve.

I have created an agenda (http://28edegem.scoutnet.be/agenda.php) . The
agenda contains events and birthdays of the members. I query the events and
birthdays per month and sort them on date.
This method works fine for the events since they are all for the same year
(eg 2003) but doesnt work for the birthdays because someone born in
1980-06-23 will be sorted before someone born in 1876-06-05 . This is a big
problem because the person born on the fifth day wont be echo'ed . The
problem can be easily be solved by only requesting the month and day part of
the birthday. I'm not sure this is possible?

If the above doesnt seem to work I can always order the array myself. How
can I access a query array? I guess I can't use the fetch_row ?

View Replies !
Send Me An Email Of Birthdays
I'm not sure how this would work automatically but I was wondering how I can send myself an email say 2 weeks before a member in my database is about to have a birthday? I'm assuming the query would need to be running constantly so would it be possible?

View Replies !
Sort Results By Date/time, Limit 5 Database Entries Of Today &/or Upcoming Days
I'm designing a website for my fraternity and in the database I have entries which contain past events, todays events, and upcoming events.  My problem is that I can not figure out how to sort the query results to display:
 
1) only past events based on the CURRENT DATE
2) only the events which fall on the CURRENT DATE or after, limiting the results to 5 entries
3) all events that fall on CURRENT DATE or afterwards

Example:   
Today is  September 15, 2007

Problem 1) Displaying all events that happened before September 15, 2007
Problem 2) Displaying only 5 results that fall on September 15, 2007 or after
Problem 3) Displaying all events that are happening on or after September 15, 2007

And obviously I would like the CURRENT DATE to change depending on what date it is, currently.

Ok so now I've been very redundant in my explanation of my problem here is the code and a link to what that particular page looks like. Code:

View Replies !
Display Birthdays Coming Up In The Next Couple Of Weeks?
I wonder if someone could help a novice to create a bit of code that will display birthdays coming up in the next couple of weeks?

I have a mysql database with a date of birth(dob) date field but unsure how to check that field against the present date I only have at present, and don't knoe if this is right?

while ($row = mysql_fetch_array($result2))
{
$dob=$row["dob"];
list($year, $month, $day)= explode("-", $dob);
$birth_day = "$day";
$birth_month = "$month";
$birth_year = "$year";
}

Obviously I only need the day and month values but is there a pre built function to do this for me?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved