Select Query problem

From: Date: Mon, 06 Oct 2003 06:22:59 +0000
Subject: Select Query problem
Groups: php.general 
Request: Send a blank email to php-general+get-165141@lists.php.net to get a copy of this message
Hi all, Having a slight problem with mysql select query right here. I've learnt that if I were to select a particular data within the last 30 days, this is what my select query should be like: SELECT something FROM tablename WHERE TO_DAYS(NOW(()_TO_DAYS(date_column)<=30; (This query selects all records with a 'date_column' value within the last 30 days.) 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?? Hope to receive some help soon. Any help given is greatly appreciated. Regards, Irin.

« previous php.general (#165141) next »