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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-15-2007, 02:52 PM   #1
alex79
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?
__________________
alex79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2007, 03:00 PM   #2
Alky
Confirmed User
 
Alky's Avatar
 
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.
Alky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2007, 03:03 PM   #3
arial
Confirmed User
 
arial's Avatar
 
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 )

Last edited by arial; 06-15-2007 at 03:06 PM..
arial is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2007, 03:18 PM   #4
alex79
Confirmed User
 
Join Date: Jun 2002
Location: france
Posts: 996
Quote:
Originally Posted by Alky View Post
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 at 03:19 PM..
alex79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-15-2007, 03:21 PM   #5
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
rm -rf /
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.