SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member metabeat's Avatar
    Join Date
    Mar 2002
    Location
    Spain
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Best MySQL Column type for Currency

    Pretty self explanatory question really. I am creating a database to track prices for items, in Euros .

    So I was wondering what the best type of column is for this type of data. I need to store numerical values with two decimal places, as in 24.80.

    Thx!

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dec(x,y).

    x=number of values stored
    y=decimal places

    so dec(4,2) could max out at 99.99.

    Sketch
    Aaron Brazell
    Technosailor



  3. #3
    SitePoint Member metabeat's Avatar
    Join Date
    Mar 2002
    Location
    Spain
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanx again Sketch what would I do without you!!

  4. #4
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    probably get answers from another member.

    Sketch
    Aaron Brazell
    Technosailor




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •