Jump to content
  • 0
Sign in to follow this  
MrSky

How can i get a variable with php?

Question

7 answers to this question

Recommended Posts

  • 0
$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 :)

Share this post


Link to post
Share on other sites
  • 0

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>

Share this post


Link to post
Share on other sites
  • 0
 

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 by MrSky

Share this post


Link to post
Share on other sites
  • 0

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 by Stickhead

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.