I am setting up a mysql database with 2 fields one is a name (text string) and one with a date. yyyy-mm-dd.
I need to query the table to show only the names that match the dd-mm. So on the anniversary of that date every year those names get printed.
$query = "SELECT * FROM FRSLNamelist WHERE $dateofdeath";
$result = mysql_query($query);
while ($line = mysql_fetch_assoc($result)) {
echo $line['fullname'];
echo "<br>";
I can't find anywhere how to do this. I know that you can explode the date field separated so you only have to match the month and day.
I need the function to do:
If [datefield] = [current.day.month]
then print [name]
.
anybody have quick fix.
Thanks in Advance.