GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   MySql query (https://gfy.com/showthread.php?t=743141)

alex79 06-15-2007 02:52 PM

MySql query
 
Any MySql experts here?

What is the query to return last 10 days, 1 day per row?

Alky 06-15-2007 03: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.

arial 06-15-2007 03: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 )

alex79 06-15-2007 03:18 PM

Quote:

Originally Posted by Alky (Post 12606878)
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..

fris 06-15-2007 03:21 PM

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