Sample data products from the database with different currencies?
The essence of the problem is this:
1. There is a search form which has a field, for example, the value of the goods from...to.
2. The user enters for example from 100 USD to 500 USD
3. The database has the records of goods that have price fields, and there are currency_id currency table
If, for example, the search item for $ 300, it will appear in the selection of goods for $ 300 and, for example, for 200 euros, but for 300 euros not come as 300 Euro more than 300 dollars.
Ie at the level of the query, all is given to any single currency?
maegan_OConnell66 answered on September 19th 19 at 12:51
Crappy made base. The inconsistency of the base causes the base itself ceases to understand how to map entities to each other, in your case, you can't query against a table of goods to know which one is more expensive and some cheaper. Keep Liebe two fields - in the rubles and the currency, or communicate with the base only in rubles and the conversion of produce for each request.