How to get data one year before till now from database in mysql
×


How to get data one year before till now from database in mysql?

2680

Answer: To select all records one year ago till today, first of all you have to get the current date for comparing the year with date in your database.

SELECT * FROM users WHERE join_date >= DATE_SUB(NOW(),INTERVAL 1 YEAR);



Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments