![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jun 2002
Location: france
Posts: 996
|
MySql query
Any MySql experts here?
What is the query to return last 10 days, 1 day per row? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Apr 2002
Location: Houston
Posts: 5,651
|
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jul 2002
Location: Bay Area
Posts: 4,012
|
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 )
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Join Date: Jun 2002
Location: france
Posts: 996
|
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.. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,372
|
rm -rf /
|
![]() |
![]() ![]() ![]() ![]() ![]() |