I want to select the following from mysql
Last 12 hours
Last 24 hours
last 7 days
last 1 month
I will be glad with some one help me
I want to select the following from mysql
Last 12 hours
Last 24 hours
last 7 days
last 1 month
I will be glad with some one help me
MySQL DATE_SUB() Function is what you want. Google is your friend on how to use it.
I will give you one example:
[php]SELECT DATE_SUB(yourColumnNameHere,INTERVAL 5 DAY) AS SubtractDate
FROM yourTableNameHere[/php]
thanks