I am using MySQLi and I have SQL structure like This and I want all records which have expired date before 1 month
for that, I have tried
SELECT
*
FROM
new_domain
WHERE
DATEPART( m, expire_date ) = DATEPART( m, DATEADD( m, -1, getdate() ) )
AND
DATEPART( yyyy, expire_date ) = DATEPART( yyyy, DATEADD( m, -1, getdate() ) )
but with that, I have receive an error #1305 - FUNCTION DATEPART does not exist
can anybody help me with this