Re: Select Query problem

From: Date: Mon, 06 Oct 2003 06:47:11 +0000
Subject: Re: Select Query problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-165143@lists.php.net to get a copy of this message
n Mon, 6 Oct 2003 14:22:59 +0800, you wrote: >Now my question is: What if I would like to display data for the CURRENT MONTH >and the last 11 months???(May also said to be the LAST MONTHS) >HOw should my select query be like?? On Mon, 06 Oct 2003 07:30:26 +0100, David Otton <phpmail@jawbone.freeserve.co.uk> wrote: This question isn't on-topic for this list; it's about SQL, not PHP. You'll get a better response on a mailing list for users of your DB. You also didn't mention which database you're using. However, assuming MySQL I'd start by looking at the MONTH() function. Something like SELECT * FROM table WHERE MONTH(date_column) = 10; (untested). Oh yah, sorry forgotten which database I'm using. Anyway, will be using mysql. ..... Regards, Irin.

« previous php.general (#165143) next »