How to fetch this week records in MySql ?

How to fetch this week records in MySql ?

In this post we will give you information about How to fetch this week records in MySql ?. Hear we will give you detail about How to fetch this week records in MySql ?And how to use it also give you demo for it if it is necessary.

If you require to get all the records of current week using mysql query. for example you have one table “items” and columns are id, title, description, created_at and update_at, Now you want to get all records of this week. so you can fetch fields value using DATE_SUB and INTERVAL of mysql. In following example you can see how to select data of current week.

Example

Also see:How to get last 2 days records from table using Mysql Query?
SELECT * FROM items WHERE created_at > DATE_SUB(NOW(), INTERVAL 1 WEEK);

Hope this code and post will helped you for implement How to fetch this week records in MySql ?. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

64  +    =  65

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US