Roger: I found using variables to work as expected with 3.23.43 and Win98.
I was unable to duplicate your changing outputs. mysql> select @a:=digits,number,round(number,@a) from testme; +------------+----------+------------------+ | @a:=digits | number | round(number,@a) | +------------+----------+------------------+ | 3 | 100.4235 | 100.4230 | | 1 | 85.4000 | 85.4000 | +------------+----------+------------------+ 2 rows in set (0.00 sec) mysql> select @a:=digits,number,round(number,@a) from testme; +------------+----------+------------------+ | @a:=digits | number | round(number,@a) | +------------+----------+------------------+ | 3 | 100.4235 | 100.4230 | | 1 | 85.4000 | 85.4000 | +------------+----------+------------------+ 2 rows in set (0.00 sec) ... ad infinitum. (Well, six-tum.) How'd YOU do that?!? Doug On Tue, 26 Feb 2002 19:22:56 +0100, Roger Baklund wrote: >* [EMAIL PROTECTED] >> mysql> select round(number,digits) from testme; >> +----------------------+ >> | round(number,digits) | >> +----------------------+ >> | 100.4240 | >> | 85.4000 | >> +----------------------+ >> 2 rows in set (0.08 sec) > >This looks like a bug... and using variables as a workaround does _not_ >work: > >mysql> set @a:=8; >Query OK, 0 rows affected (0.00 sec) > >mysql> select @a:=digits,round(number,@a) from testme; >+------------+------------------+ >| @a:=digits | round(number,@a) | >+------------+------------------+ >| 3 | 100.42300000 | >| 1 | 85.40000000 | >+------------+------------------+ >2 rows in set (0.00 sec) > >mysql> select @a:=digits,round(number,@a) from testme; >+------------+------------------+ >| @a:=digits | round(number,@a) | >+------------+------------------+ >| 3 | 100.4 | >| 1 | 85.4 | >+------------+------------------+ >2 rows in set (0.00 sec) > >mysql> select @b:=digits,round(number,@b) from testme; >+------------+------------------+ >| @b:=digits | round(number,@b) | >+------------+------------------+ >| 3 | 100 | >| 1 | 85 | >+------------+------------------+ >2 rows in set (0.00 sec) > >mysql> select @b:=digits,round(number,@b) from testme; >+------------+------------------+ >| @b:=digits | round(number,@b) | >+------------+------------------+ >| 3 | 100.4 | >| 1 | 85.4 | >+------------+------------------+ >2 rows in set (0.00 sec) > > >-- >Roger >query --------------------------------------------------------------------- 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