You are here: Re: problem with currency signs « PHP « IT news, forums, messages
Re: problem with currency signs

Posted by "Satyam" on 01/10/06 22:56

Instead of using arbitrary numbers for currencies, use the ISO standard 3
letter codes:

http://en.wikipedia.org/wiki/ISO_4217

The currency symbol by itself does not identify the currency. Many
countries use the $ sign to represent whatever their currency might be so
that by itself says very little.

A separate table with the ISO 4217 code, the expanded description and the
currency sign would be quite handy.

Most exchange bureaus do use the ISO codes, since those codes are used in
international money markets, so you don't need to describe those codes to
them, they are quite used to them.

Satyam



"Serdar Soydemir" <serdar.soydemir@gmail.com> wrote in message
news:F2.00.10207.50D03C34@pb1.pair.com...
> Hi Angelo,
>
> You may create a separate table called "currencies" and put two fields
> like "currency_id" and "currency_desc" in it. Insert all the currencies
> you're using to this table. At the end, you'll have a currency_id for each
> of your currencies. Now, you can use those ID numbers in your forms and in
> your codes for any kind of data collection and data manipulation. It's
> always better to define frequently used variables using this way.
>
> Regards
> Serdar
>
> Angelo Zanetti wrote:
>> Hi guys,
>>
>> Im having problems with the Euro and Pound currency signs and storing
>> them etc...
>>
>> here is my scenario. I have a menu/list of currencies available for
>> selection, HTML below for the signs:
>>
>> $ &pound;
>> &euro;
>>
>> When listed in the browser they show fine.
>> When I want to save them, they are saved as the actual sign in the DB and
>> not the HTML code for the symbol, which isnt a train smash, however, when
>> I try compare the values in the DB with the predefined list of currency
>> symbols, I get some problems.
>>
>> The below if statement doesnt seem to resolve:
>>
>>
>> if ($row['p_currency'] == "€") //where € is also the value in the DB
>>
>>
>> even if the value is €, or &euro; it still never reverts to true...
>>
>> So is there a special way I should be treating the symbols and maybe a
>> special way I should be storing them? or comparing them?
>>
>> thanks in advance

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация