Jump to content
Overlord

[Resolvido] AJUDA COM ESTE PHP!

Recommended Posts

Olá a todos, estou tentando criar esta query com o objetivo de mostrar em meu website simplesmente uma frase contendo:
'Quantidade de Cash: xxxxxx'
 
Lá vai o código que fiz, porém sem sucesso:
 
<?php if (!defined('FLUX_ROOT')) exit; ?>
<?php

     $host = "localhost"; 
     $db = "xxxxxxxxx"; 
     $user = "yyyyyyyyy"; 
     $pass = "zzzzzzzzz"; 

       $con = mysql_pconnect($host, $user, $pass) or trigger_error(mysql_error(),E_USER_ERROR); 
       mysql_select_db($db, $con);
           $log = if($params->get('account_id') == 'login')
           $query = sprintf("SELECT account_id WHERE $log, AND SELECT value FROM acc_reg_num_db WHERE KEY = '#CASHPOINTS'");
     echo 'Cash:' $query;

?> 

Oque eu preciso?

1. De uma query que verifique qual o ACCOUNT_ID logado no site

2. Em seguida, a query deverá ler APENAS a KEY que contenha #CASHPOINTS na tabela acc_red_num_db
3. E em seguida mostre o seu VALUE.

 

QUEM PUDER AJUDAR AGRADEÇO, SOU NOVO COM ISSO, ATÉ ENTENDO UM POUCO MAIS ESTOU TOMANDO UMA SURRA.

OBRIGADO!

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

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