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 !
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 !