mail[Galette-devel] [task #7530] Transformer en SQL t ous les montants de float à decimal


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Mélissa Djebel on November 29, 2011 - 22:42:

URL:
  <http://gna.org/task/?7530>

                 Summary: Transformer en SQL tous les montants de float à
decimal
                 Project: Galette
            Submitted by: melissadjebel
            Submitted on: mar 29 nov 2011 21:42:07 GMT
         Should Start On: mar 29 nov 2011 00:00:00 GMT
   Should be Finished on: mar 29 nov 2011 00:00:00 GMT
                Priority: 5 - Normal
                Severity: 5 - Average
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
                  Effort: 0.00

    _______________________________________________________

Details:

Sur les tables suivantes :
- galette_cotisations -> montant_cotis
- galette_transactions -> trans_amount

transformer les colonnes numériques de montants de float à decimal(15,2)
pour éviter les problèmes d'arrondis foireux lors des additions et autres
opérations mathématiques et qu'un 0 soit un 0 et pas un -7.4324546E-7


Script MySQL :

ALTER TABLE `galette_cotisations` CHANGE `montant_cotis` `montant_cotis`
DECIMAL( 15, 2 ) UNSIGNED NULL DEFAULT '0'

ALTER TABLE `galette_transactions` CHANGE `trans_amount` `trans_amount`
DECIMAL( 15, 2 ) NULL DEFAULT '0'





    _______________________________________________________

Reply to this item at:

  <http://gna.org/task/?7530>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/




Related Messages


Powered by MHonArc, Updated Wed Nov 30 21:40:05 2011