How to store and deal with Mysql currency money value data?

Since money needs an exact representation don’t use data types that are only approximate like float. You can use a fixed-point numeric data type for that like

15 is the precision (total length of value including decimal places)
2 is the number of digits after decimal point
See MySQL Numeric Types:

These types are used when it is important to preserve exact precision, for example with monetary data.


I personally use numeric(19,4) for financial records that gives you a better hand to play and adopt new requests easily.

facebooktwittergoogle plus


How to run Windows 8 on a Lacie Rugged Thunderbolt on your Mac that already runs a Boot Camp windows?

What you need:

  • Lacie Rugged Thunderbolt
  • Windows 8 DVD (buy or make one)
  • Mac , macbook retina , that already has a bootcamp Windows running
  1. Partition your Lacie in OS X, using GUID GPT partition so that an EFI  partition is created.
  2. Next, let your Windows partition be the 2nd partition. You may decide to create more partitions in the 3rd, 4th and so on slots, or you may choose to let the whole 2nd partition be for Windows.

    Disk 0 is Lacie with Windows 8 is installed into C: BOOTCAMPWIN8P 440GB. Disk 1 is the current Macbook Pro partition set up.

  3. Take note of the size of your newly created partition for Windows. You will use this to identify the drive to install Windows to later!
  4. Download bootcamp drivers by googling: “download boot camp drivers for windows 8” or visiting: https://support.apple.com/kb/DL1720?locale=en_US
  5. Disconnect all other drives and unnecessary peripherals as we proceed to restart the computer and install Windows 8.
  6. Put in your Windows 8 DVD and start with it by holding onto ALT when restarting your Mac. Select the DVD and start installation.
  7. Proceed as usual and when asked to pick the drive to install, look for the size in Step 3, and make sure you select the correct partition! Pick it and let install run.
  8. When your computer restarts during installation, hold on to ALT, and you will notice there isn’t a new Windows icon beside the Windows icon that you already had. Continue to select the CD/DVD Windows installation – until your Windows installation is complete!
  9. Once windows is complete, you may now restart your computer, hold on to ALT, and pick your OLD Windows icon instead of the CD/DVD icon – You will now be able to pick between Windows 8 or Windows OLD. Windows 8 has installed a new boot manager to let you select between your Windows installation.
  10. If you do not plug in your Lacie Rugged Thunderbolt, selecting old Windows will load your old Windows. Isn’t that good?
    1. With a Windows 8.1 Pro you can upgrade to Windows 10 Pro. So make sure you got the Pro version
facebooktwittergoogle plus