MySQL and currency (euro format)

Discussion in 'Programming/Scripts' started by edge, Jan 22, 2010.

  1. edge

    edge Active Member Moderator

    I'm trying to code a small site with a search function on it.
    One of the values that is can be search is the price of a product.

    Till now I was stroring the price as a varchar() type, but this way it can not be used to do a search query with "BETWEEN". (example: BETWEEN 20 and 50)

    Anyone here who can tell me what I should use as type in the MySQL?
    Please note that the Dutch format of currency use is like this:
    1.000,50 (one thousand euro and 50 cents) and:
    25,75 (twenty five euro and seventy five cents)

    Or.. Is there an other way of doing this?

    Once again thank you for any info on this.
  2. falko

    falko Super Moderator ISPConfig Developer

Share This Page