How to fetch this week records in MySql ?By Hardik Savani | February 28, 2016 | | 9187 Viewer| Category : PHPMySql
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.
SELECT * FROM items WHERE created_at > DATE_SUB(NOW(), INTERVAL 1 WEEK);
- PHP AngularJS CRUD with Search and Pagination Example From Scratch
- Simple PHP Jquery Ajax CRUD(insert update delete) tutorial example with source code
- Twitter Bootstrap - Digital Clock picker with AM PM example using clockface plugin
- Laravel 5 - Dynamic Dependant Select Box using JQuery Ajax Example - Part 1
- Codeigniter 3 - select2 ajax autocomplete from database example with demo
- How to parse json in jquery ajax?
- How to install composer using command line in ubuntu ?
- How to create REST API in Laravel 5 ?