Hi!

>>>>> "Aurelian" == Aurelian Dumitru <[EMAIL PROTECTED]> writes:

Aurelian> Please record the following bug identified on the MySQL server:

Aurelian> 1. Hardware: SUN Ultra 10
Aurelian> 2. Operating system: Sun Solaris 2.7
Aurelian> 2. MySQL server version: 3.23.33
Aurelian> 3. Error description:
Aurelian>      - The following SQL statement returns incorrect results when is executed
Aurelian> using the 'mysql' client: SELECT @myvar := ( CURRENT_DATE - 1) ;
Aurelian>      - I ran this query every day. It worked fine untill May 1st, 2001, when 
the
Aurelian> above query returned the following value: 20010500 . It should have returned
Aurelian> 20010430.

This is because you are using number subtraction, not date
subtraction.

The correct way to do this is:

SELECT @myvar := DATE_SUB(CURRENT_DATE, INTERVALL 1 DAY) ;

Regards,
Monty

---------------------------------------------------------------------
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

Reply via email to