On 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??
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). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php