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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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