3rd fix and added currency thing..
This commit is contained in:
parent
c3ee098a72
commit
df9af2107e
|
|
@ -21,16 +21,17 @@ class PartyStarter {
|
||||||
$query->bindParam(':id', $id);
|
$query->bindParam(':id', $id);
|
||||||
$query->execute();
|
$query->execute();
|
||||||
$money = $query->fetch(PDO::FETCH_ASSOC)["money"];
|
$money = $query->fetch(PDO::FETCH_ASSOC)["money"];
|
||||||
|
$currencyIcon = "$";
|
||||||
|
|
||||||
if ($money < 1000000) {
|
if ($money < 1000000) {
|
||||||
// Anything less than a million
|
// Anything less than a million
|
||||||
$money = number_format($money);
|
$money = $currencyIcon.number_format($money);
|
||||||
} else if ($money < 1000000000) {
|
} else if ($money < 1000000000) {
|
||||||
// Anything less than a billion
|
// Anything less than a billion
|
||||||
$money = number_format($money / 1000000, 1) . 'M';
|
$money = $currencyIcon.number_format($money / 1000000, 1) . 'M';
|
||||||
} else {
|
} else {
|
||||||
// At least a billion
|
// At least a billion
|
||||||
$money = number_format($money / 1000000000, 1) . 'B';
|
$money = $currencyIcon.number_format($money / 1000000000, 1) . 'B';
|
||||||
|
|
||||||
}
|
}
|
||||||
// messy shit sorry mario1 fix it urself :trol:
|
// messy shit sorry mario1 fix it urself :trol:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
@cmd
|
||||||
Loading…
Reference in New Issue