tomyknoker
04-17-2007, 04:11 PM
I have this script
$date = date('d/m/Y');
$month = date('m');
if ($month == "12") {
$theMonth = "01";
}
else {
$theMonth = $month+1;
}
My Query
$query = "SELECT tblmembers.*
, tblrepresentatives.rep_Firstname
, tblrepresentatives.rep_Lastname
FROM tblmembers
LEFT OUTER
JOIN tblrepresentatives
ON tblrepresentatives.rep_NBR = tblmembers.rep_NBR
WHERE MONTH(tblmembers.DateOfBirth) = $theMonth
AND tblmembers.MemberApproved = 'A' ORDER BY LastName";
And then it outputs to this
The following members are Celebrating Birthdays in $theMonth.
At the moment it just outputs the month as a number, do I need to set up 12 sepearate if statements, to get the numbers to be converted to text?
$date = date('d/m/Y');
$month = date('m');
if ($month == "12") {
$theMonth = "01";
}
else {
$theMonth = $month+1;
}
My Query
$query = "SELECT tblmembers.*
, tblrepresentatives.rep_Firstname
, tblrepresentatives.rep_Lastname
FROM tblmembers
LEFT OUTER
JOIN tblrepresentatives
ON tblrepresentatives.rep_NBR = tblmembers.rep_NBR
WHERE MONTH(tblmembers.DateOfBirth) = $theMonth
AND tblmembers.MemberApproved = 'A' ORDER BY LastName";
And then it outputs to this
The following members are Celebrating Birthdays in $theMonth.
At the moment it just outputs the month as a number, do I need to set up 12 sepearate if statements, to get the numbers to be converted to text?