I am creating a web app where if a user clicks on Link called \"WEEK\", the page shows up all the posts which were submitted in that week. There\'s also an option to view all th
There are several MySQL functions that do things like this for you
SELECT * FROM posts WHERE WEEK(post_date) = WEEK(CURDATE()) AND MONTH(post_date) = MONTH(CURDATE())