Ive never done this, but i will be sometime within the next few months for a project im doing.
Anyway..
What id do would be first
extract the data from the database..
so YYYY-MM-DD which could be 1999-09-12
Then from there use explode
$date = $r['bday']; //bday being the YYYY-MM-DD Feild
$data = explode("-",$date);//We now have 3 seperate bits of data.
From there its simple maths. First working out the Month and Comparison to the current month, then Year and then day. You'd probably make the year last.
You'll have left over data from that ofcourse.
If this doesnt seem easy enough to do, you could probably use the same method to start then use mktime to work it out.