www.webdeveloper.com
Results 1 to 3 of 3

Thread: data type recommendation for height, width and length

  1. #1
    Join Date
    Mar 2010
    Posts
    281

    data type recommendation for height, width and length

    Hey Everyone,
    i have to modify a shopping cart's product table to include height, width and length and wondering what datatype i should use?,

    can someone please make a recommendation?

    thank you!

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,536
    Pick your unit of measure, then make the column integer if you only want whole units, or decimal if you want fractional amounts. (You could use float, but in this case I'd think of it like money, where you normally only want a max of 2 decimal places, and in this case you might want only 1 decimal place, at least if it's inches or centimeters.)
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Mar 2010
    Posts
    281
    belated thanks,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles