12 float to_curr(
float amnt,
string the_curr);
24 s = s +
"<select required name=\"currency\">";
26 while (
db.
res->next())
28 s = s +
"<option value=\"" +
db.
res->getString(
"currency_id") +
"\"";
29 if (
db.
res->getString(
"currency_id") == defaultCurr) {s = s +
" selected "; }
30 s = s +
">" +
db.
res->getString(
"currency_id") +
"</option>";
46 s =
"SELECT currency_id FROM " +
oConfig.
tbl_prefix +
"_currencies WHERE currency_id = '" + the_curr +
"';";
47 this_db.
res = this_db.
stmt->executeQuery(s);
48 if(this_db.
res->rowsCount() == 1)
75 this_db.
res = this_db.
stmt->executeQuery(s);
76 if (this_db.
res->next())
78 amnt = amnt * atof(this_db.
res->getString(
"eur_p_one").c_str());
89 s =
"SELECT * FROM " +
oConfig.
tbl_prefix +
"_currencies WHERE currency_id = '" + to_curr +
"';";
90 this_db.
res = this_db.
stmt->executeQuery(s);
91 if (this_db.
res->next())
93 amnt = amnt * atof(this_db.
res->getString(
"one_p_eur").c_str());
string currency_id
eg. EUR, USD, etc.
string error_message
global message variables
string dropDown_currency(string defaultCurr="EUR")
const string tbl_prefix
tables start with "" + oConfig.tbl_prefix + "_" if the prefix is eg. "tbl" then we have "tbl_invesotr...
bool set_curr(string the_curr)
float to_curr(float amnt, string the_curr)
config oConfig
mysql connection mysql connector from dev.mysql.com
float conversion_factor(string from_curr, string to_curr)