Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Forums
Blogs
Articles
Groups
Galleries
Member List
Calendar
Home
Forum
Simply Business
Fucking Around & Business Discussion
MySql query
MySql query
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
alex79
Confirmed User
Join Date:
Jun 2002
Posts:
996
Share
Post
#1
MySql query
06-15-2007, 01:52 PM
Any MySql experts here?
What is the query to return last 10 days, 1 day per row?
Alky
Confirmed User
Join Date:
Apr 2002
Posts:
5651
Share
Post
#2
06-15-2007, 02:00 PM
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.
Comment
Post
Cancel
arial
Confirmed User
Join Date:
Jul 2002
Posts:
4012
Share
Post
#3
06-15-2007, 02:03 PM
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 )
Last edited by
arial
;
06-15-2007, 02:06 PM
.
Comment
Post
Cancel
alex79
Confirmed User
Join Date:
Jun 2002
Posts:
996
Share
Post
#4
06-15-2007, 02:18 PM
Originally posted by
Alky
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.
i don't have any tables to select from..
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..
Last edited by
alex79
;
06-15-2007, 02:19 PM
.
Comment
Post
Cancel
fris
Too lazy to set a custom title
Join Date:
Aug 2002
Posts:
55679
Share
Post
#5
06-15-2007, 02:21 PM
rm -rf /
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎
☕
Comment