I am doing a search in the database where I want to return the records of the last seven days. I made a SQL script that returns me the records of the last 7 days but it does not count the current day as being the first day of the 7. For example if I add a new item in the table with today's date and execute the script it just goes show me this new record when it is completed one day. Here's the script:
SELECT * FROM postagem_pagina WHERE postagem_pagina.data_postagem BETWEEN CURRENT DATE - 7 AND CURRENT DATE