I am trying to makes some queries using a PostgreSQL database and I'm having issues with my SQL statements. I normally work with mySQL database and can translate most queries with no issues. I used this query the other day and cannot for the life of me figure out how to query this in PostgreSQL.
$query1 = "SELECT * FROM table_name WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_field";
The date_field in the PostgreSQL is a DATE field and I want to get all fields that have been added to the database in the last 30 days. This query works in a mySQL DB but i get an error using it in a PostgreSQL DB. How would you create this query for a PostgreSQL Database?