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

Reply via email to