Tag : DATE_SUB


How to get current month data in MySql PHP ?

If you require to get all the records of current month 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 month. 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 month. <strong class="example">Example:</strong> <pre class="language-mysql">SELECT * FROM items WHERE created_at > DATE_SUB(NOW(), INTERVAL 1 MONTH);</pre>

By Hardik Savani | March 17, 2016 | | 1421 Viewer | Category : PHP MySql
READ MORE

    Laravel 5.3 - import export csv and excel file into database

    Laravel 5.3 - import export csv and excel file into database

    Open Post

    Laravel 5 amazon s3 file upload tutorial - Part 2

    Laravel 5 amazon s3 file upload tutorial - Part 2

    Open Post

    How to implement infinite ajax scroll pagination in Laravel 5?

    How to implement infinite ajax scroll pagination in Laravel 5?

    Open Post

    Laravel 5 - Multiple Images Uploading using dropzone.js example with demo

    Laravel 5 - Multiple Images Uploading using dropzone.js example with demo

    Open Post

    How to disable model timestamps in Laravel 5.3?

    How to disable model timestamps in Laravel 5.3?

    Open Post

    AngularJS - scroll to a specific element using anchorscroll

    AngularJS - scroll to a specific element using anchorscroll

    Open Post