I have a Postgres table containing bio for people, and in particular, I want to display people who have birthdays in the current month.
I've recently switched over from MySQL and it was a simple thing to compare the month of a person's birthday to the numerical value of the current month via the SQL statement.
I can't seem to be able to do the same thing with Postgres, and the extract() function doesn't seem to work as a "where" condition.
I'm contemplating just retrieving every single person in the table and doing the date compare in PHP, but I was hoping there was a better way to do it?
Many thanks in advance.
I've recently switched over from MySQL and it was a simple thing to compare the month of a person's birthday to the numerical value of the current month via the SQL statement.
I can't seem to be able to do the same thing with Postgres, and the extract() function doesn't seem to work as a "where" condition.
I'm contemplating just retrieving every single person in the table and doing the date compare in PHP, but I was hoping there was a better way to do it?
Many thanks in advance.