On Tue, 5 Jun 2001, Mark Stosberg wrote:
> > > second_to_last_visit from users where last_visit = NULL;
> >
> > What if you use "last_visit IS NULL"?
>
> Thanks, this works. I still think MySQL behaved poorly by not either:
> a), accepting my syntax, or B.) throwing an error that the syntax was
> incorrect. The result it returned appeared incorrect.
It is not syntax error. MySQL always converts all types of variables into
right ones. In your case last_visit is integer or datetime and right
operand of equation was converted to it i.e. 0 not NULL. In most cases
this is very good feature, not bug.
Tonu
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php