![]() |
MySql query
Any MySql experts here?
What is the query to return last 10 days, 1 day per row? |
select date_entered from data_table where date_entered < Date_Sub(now(),interval 10 day) group by date_entered
its something like that, it didn't test it though. date_entered is obviousley a column in your table holding date info. |
You're going to need to provide a little more info than that but you can start off with using this: SELECT * FROM `table` WHERE DATE_SUB( CURDATE( ) , INTERVAL 10 DAY )
|
Quote:
all i can use is curdate() and date_sub or other mysql commands.. but no table to select from.. so, today we are 2007.06.15.. i wand the query to retourn dates from 2007.06.15 to 2007.06.05, one day on each row.. |
rm -rf /
|
All times are GMT -7. The time now is 07:45 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123