[Db] Mysql e calcoli in virgola mobile
Davide Michel 'ZioBudda' Morelli
michel a ziobudda.net
Gio 11 Gen 2007 17:48:00 CET
Ciao all. Ho una tabella utenti con un campo U cosi' definito:
`U` float NOT NULL default '0',
Ora guardate cosa seccede:
mysql> update Utenti set U = 0;
Query OK, 1 row affected (0.00 sec)
Rows matched: 29 Changed: 1 Warnings: 0
mysql> update Utenti set U = 0.01 where id_u = 141;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select U from Utenti where id_u = 141;
+------+
| U |
+------+
| 0.01 |
+------+
1 row in set (0.00 sec)
mysql> select MAX(U) from Utenti;
+--------------------+
| MAX(U) |
+--------------------+
| 0.0099999997764826 |
+--------------------+
1 row in set (0.00 sec)
Che qualcuno mi spieghi cosa combina MySQL. Anche perche' mi sballa
tutti i conti cosi' facendo.
M.
--
Michel 'ZioBudda' Morelli michel a ziobudda.net
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: +39-0240706096 -- Fax: +39-0291390660
Cellulare: +39-3939890025
http://www.ziobudda.net ICQ: 58351764
http://www.ziobuddalabs.it Skype: zio_budda
http://www.ajaxblog.it
Maggiori informazioni sulla lista
Db