Maybe like:
SELECT something FROM tablename
WHERE date_column >
DATE_SUB(CONCAT(YEAR(NOW()),'-',MONTH(NOW()),'-','01'), INTERVAL @n
MONTH)
@n is the number of months you want. If you want data from the current
month, @n would be 0.
--
Diana Soares
On Mon, 2003-10-06 at 07:23, [EMAIL PROTECTED
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 sel