I'm developing a Shopping Cart in PHP; after I have all my products, I have a $total.
If I have $ 14589.579 then I use number_format($total,2); to see $14,589.58.
But when I try to insert it into my database, I only see 14. The field on my database is type double.
This is my query:
"INSERT INTO cotizacion (
idcotiza, idcli, idusuario, fechacotiza, pais, proyecto, notas, formapago,
tiempoentrega, flete, instalacion, venta, subtotal, descuento, total,
totalpesosmex, status, fecha2
) VALUES (
NULL, '".$_SESSION['idcliente']."','".$_SESSION['idusuario']."', '".$fechatoday."',
'".$pais."', '".$proyecto."', '".$notas."', '".$formapago."', '".$fechaentrega."',
'".$flete."', '".$instalacion."', '".$venta."', NULL, NULL, '".$total."',
'".$totalpesosmex."', 'Abierto', NULL
);"
Any idea about what I could do?