List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 6 1999 6:18pm
Subject:Re: possible bug in the MySQL Reference Manual for version
3.22.25.
View as plain text  
At 8:14 PM +0200 11/6/99, Yona Shlomo Cn1w00 Ohana Roni wrote:
>  >Description:
>	mysql> SELECT name, birth FROM pet
>     -> WHERE MONTH(birth) = MOD(MONTH(NOW()),12) + 1;
>    
>     the bug, IMHO, is that the `+1' should be right after the NOW() 
>instead of it's current place.
>
>>How-To-Repeat:
>	just read the manual at chapter 8 section 3.4.6
>>Fix:
>	put the +1 after NOW() instead of its current palce.


Why?


The output from MOD(exr,12) will always be 0-11.
The output from MONTH(date) is always 1-12.

-- 
Paul DuBois, paul@stripped
Thread
possible bug in the MySQL Reference Manual for version 3.22.25.Yona Shlomo Cn1w00 Ohana Roni6 Nov
  • Re: possible bug in the MySQL Reference Manual for version3.22.25.Paul DuBois6 Nov
  • Re: possible bug in the MySQL Reference Manual for version 3.22.25.Bob Kline6 Nov