[prev in list] [next in list] [prev in thread] [next in thread]
List: php-db
Subject: Re: [PHP-DB] mySQL date query
From: Chaitanya Yanamadala <dr.virus.india () gmail ! com>
Date: 2010-04-13 6:49:28
Message-ID: z2i6e124171004122337jc6352966p935b410f0bf85b88 () mail ! gmail ! com
[Download RAW message or body]
try this
SELECT DATE_ADD('2008-01-02', INTERVAL -7 DAY);
Chaitanya
On Tue, Apr 13, 2010 at 12:01 PM, Ron Piggott <
ron.piggott@actsministries.org> wrote:
> It is in a 'date' column type YYYY-MM-DD
>
> > what is the format of the date u are storing ?
> >
> > Chaitanya
> >
> >
> >
> > On Tue, Apr 13, 2010 at 11:50 AM, Ron Piggott <
> > ron.piggott@actsministries.org> wrote:
> >
> >> I am trying to write a mySQL query on my "stats" table. I am trying to
> >> determine the number of records (users) during a 7 day period ending
> >> yesterday. I always to keep it current ... Yesterday will keep
> >> changing.
> >> In other words I want to know the number of users who accessed the web
> >> site during seven full days.
> >>
> >> This is the beginning of the query. The date column is "date".
> >>
> >> SELECT count(`visits`) as users FROM `stats` WHERE `date`
> >>
> >> Thanks, Ron
> >>
> >>
> >> --
> >> PHP Database Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
>
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic