If I want to show only today's birthdays and I put
$birthdays = _get_upcoming_birthdays_days(variable_get("birthdays_days_number", 5));
the module only shows one entry and not the two birthdays on that date. If I ask for a higher number of days, this does not happen.
If anyone finds a workaround, please let me know. Have a nice day,
Felix.
Comments
Comment #1
maartenvg commentedI haven't got a solution for it at this moment, but the block-code has proven to be buggy. I' m working on a new version which hopefully solves these kind of problems.
Comment #2
felixsmile commentedHi!
After some SQL fiddling here I "my" solution, but I think it's a solution we could actually commit to head:
The correspoding SQL request is this one (just for someone who might wonder like I did at the beginning):
Of course, in case we show more than one birthday, we would have to introduce the order command again, as well as the %s in the two lines concerned.
But otherwise, it works well.
Have a nice day,
Felix.
Comment #3
maartenvg commentedApparently I didn't entirely understand your problem, but I think I do now.
The function call below should give today's birthdays. There is a bug in the current HEAD version, but I'm not sure whether it regards problem. The new version I'm working on right now, works as expected when using the below call.
In my opinion, adding a specific query for when the global one suffices, isn't necessary. But i'll make a function called something like get_todays_birthdays() which does the above action, for use in other modules and themes.
Comment #4
felixsmile commentedHi,
Well, I thought one could use this SQL Query instead of the other one, but I'm not sure which one is faster, maybe the other one. That was all.
Very good the issue is solved in the new version!
Thank you very much, have a nice day,
Felix.
Comment #5
(not verified) commented