MrSky 0 Posted November 10, 2014 Hi guys! How can i show a variable from mysql on fluxcp with php? I.e. show #cashpoint on fluxcp? Quote Share this post Link to post Share on other sites
0 Stickhead 0 Posted November 12, 2014 (edited) well if you research you can get it right but for now i will give you the answer $sql = "SELECT value FROM {$server->loginDatabase}.global_reg_value WHERE account_id=? and str ='#CASHPOINTS'"; $sth = $server->connection->getStatement($sql); $sth->execute(array($session->account->account_id)); $res = $sth->fetch(); $curr_points = $res->value; use this echo <?php echo $curr_points; ?> hope this helps Edited November 13, 2014 by Stickhead Quote Share this post Link to post Share on other sites
0 evilpuncker 503 Posted November 10, 2014 show the result of the query in php Quote Share this post Link to post Share on other sites
0 Stickhead 0 Posted November 10, 2014 $sql = "SELECT *value* FROM {$server->loginDatabase}.*cashpointTable* ORDER BY id DESC "; $sth = $server->connection->getStatement($sql); $sth->execute(); $cash = $sth->fetchAll(); here is a sample Quote Share this post Link to post Share on other sites
0 MrSky 0 Posted November 10, 2014 I want show people cash on Donate page of fluxcp, instead of credit point <span class="balance-text">ROPs</span><span class="balance-amount"><?php echo number_format(ropS) ?></span> Quote Share this post Link to post Share on other sites
0 MrSky 0 Posted November 10, 2014 (edited) here is a sample I'm trying this now, but dont show <?php $sql = "SELECT *value* FROM {$server->loginDatabase}.`global_reg_value` where `account_id` = `2000000` and `str` = `#CASHPOINTS`"; $sth = $server->connection->getStatement($sql); $sth->execute(); $cash = $sth->fetchAll(); ?> <span class="balance-text">ROPs</span> <span class="balance-amount"><?php echo number_format($cash) ?></span> Edited November 10, 2014 by MrSky Quote Share this post Link to post Share on other sites
0 MrSky 0 Posted November 10, 2014 Anyone can help? Quote Share this post Link to post Share on other sites
0 MrSky 0 Posted November 23, 2014 hope this helps Thnx man, i searched but never found a complet one Quote Share this post Link to post Share on other sites
Hi guys!
How can i show a variable from mysql on fluxcp with php?
I.e. show #cashpoint on fluxcp?
Share this post
Link to post
Share on other sites