We have a table in our database. You can view it here: [http://prntscr.com/njpen5](http://prntscr.com/njpen5). What I want to do with a PHP query is to check the "end_date" column and list the ones that are within 1 week of the expiration date. For example, in the end_date column, there is a date format of 1559422800, which corresponds to June 2, 2019. I want to check this and list the IDs of those whose expiration date is 1 week prior. I even want to fetch these IDs and set up a system to send emails, but that's a lengthy process. So, I need a PHP code for this task. The table name is: xf_user_upgrade_active.