NUMERIC和DECIMAL类型被MySQL实现为同样的类型,这在SQL92标准允许。他们被用于保存值,该值的准确精度是极其重要的值,例如与金钱有关的数据。当声明一个类是这些类型之一时,精度和规模的能被(并且通常是)指定;例如:salary DECIMAL(9,2) 

解决方案 »

  1.   

    <?php    $number = 1234.56;    // english notation (default)
        $english_format_number = number_format($number);
        // 1,234    // French notation
        $nombre_format_francais = number_format($number, 2, ',', ' ');
        // 1 234,56    $number = 1234.5678;    // english notation without thousands seperator
        $english_format_number = number_format($number, 2, '.', '');
        // 1234.57?>
      

  2.   

    number_format函数,具体看手册。
      

  3.   

    呵呵 用唠叨 和 number_format函数 达到了偶的要求 
    谢谢!!