Please forgive my ignorance, I am still very much a beginner, and I don t even know if this is possible.
我需要在数据库中以另一种货币(以欧元计算,产出以美元计)列入价格清单。
I have the form to take the input for the conversion multiplier value and to put the values into an array should be relatively simple (even for me!)
<?php
// Make a MySQL Connection
$query = "SELECT price FROM table";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo $row[euros].
//here is where I need to perform the calculation with the result going into $row[dollars](euros * ex.rate = dollars)
UPDATE table SET dollars=INT($row[dollars]);
}
?>
不幸的是,我需要更多地回避这项工作。
我可以列举的是,如何将表格输入与每欧元数值成倍,并将结果写进适当的美元单位,作为分类。