#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    USA
    Posts
    67
    Rep Power
    15
    I am trying to set up a table which will hold a price for an item.

    I want it to show up like this

    +-----+
    +Price+
    +-----+
    +$.123+
    +-----+
    +$1.23+
    +-----+
    +$.001+
    +-----+

    How do i get the coumn to show amounts of money with the dollar sign?
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    Hi David,
    I don't know whether it is possible to set a currency data type in Mysql.

    But probably you may use DECIMAL(M,D) or INTEGER(M,D) datatypes for saving currency values with decimal points.

    And finally when you retrive the value from the database you can assaign "$" sign to the value.

    More details you can get it from MySql on line manual.









  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    USA
    Posts
    67
    Rep Power
    15
    You are the greatest ! =)

    Thanks for answering my questions, it seems your always aroun. Thanks a lot.

    Oh, btw, i have not posted on the perl msg yet, but I got the page working. I do not know exactly what the error was, but i can tell you that i used the Mysql module instead of the DBI module and it worked on the first try, i will elaborate more on the other forum.

    THanks again.
  6. #4
  7. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    I come daily this site and post some answers or questions here.

    I am learning a lot from here.

    Thanks Devshed!!!

    Have you solved your problem???




Similar Threads

  1. Replies: 0
    Last Post: January 3rd, 2004, 08:33 AM
  2. Is it better to declare a column NULL or NOT NULL
    By lunatic in forum MySQL Help
    Replies: 6
    Last Post: October 22nd, 2003, 03:12 AM
  3. Debugging column logic
    By tlush in forum PHP Development
    Replies: 2
    Last Post: March 13th, 2003, 03:47 PM
  4. Questions about column types
    By kixx in forum MySQL Help
    Replies: 3
    Last Post: March 10th, 2003, 06:12 PM
  5. SET column type questions
    By JMM in forum MySQL Help
    Replies: 1
    Last Post: August 2nd, 2001, 04:05 PM

IMN logo majestic logo threadwatch logo seochat tools logo