jim wrote:
One solution would be to use a variable:
SELECT @latest:= MAX(dateCreated);
Here I am getting the errors:
mysql> SELECT @latest:= MAX(dateCreated);
ERROR 1054: Unknown column 'dateCreated' in 'field list'
mysql> SELECT @latest:= MAX(user.dateCreated);
ERROR 1109: Unknown table 'use
> jim wrote:
>
> > Hi,
> >
> > The task is to find users whose accounts have not been validated for the
> > last 10 days. This SELECT accomplishes that:
> >
> > SELECT * FROM user WHERE validated LIKE 'N' AND dateCreated <=
> > DATE_SUB(CURDATE(), INTERVAL 10 DAY)
> >
> > But, using curdate()
jim wrote:
Hi,
The task is to find users whose accounts have not been validated for the
last 10 days. This SELECT accomplishes that:
SELECT * FROM user WHERE validated LIKE 'N' AND dateCreated <=
DATE_SUB(CURDATE(), INTERVAL 10 DAY)
But, using curdate() is dangerous. What if the system time is
Hi,
The task is to find users whose accounts have not been validated for the
last 10 days. This SELECT accomplishes that:
SELECT * FROM user WHERE validated LIKE 'N' AND dateCreated <=
DATE_SUB(CURDATE(), INTERVAL 10 DAY)
But, using curdate() is dangerous. What if the system time is messed
up?