If you need to select records from MySQL table records with date today and last 30 days records.
based on the Server date.
MySQL select today and last 30 days records
SELECT * FROM posts WHERE
date_of_create BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE()
;
In case if your field data type were DATETIME format you need to convert
your datetime format into date
SELECT DATE_FORMAT(
date_of_create
, '%m/%d/%Y') FROM posts WHERE
date_of_create
BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE()