View Single Post
  #14  
Old 24th September 2010, 15:07
bruno_floyd bruno_floyd is offline
Member
 
Join Date: Aug 2010
Posts: 73
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Am I getting right?

This is on my indicacao_list.php:

class list_action extends listform_actions {

public function prepareDataRow($rec) {

global $app, $sql_comissao, $sql_nao_comissao;

$sql_comissao = "SELECT SUM(valor_comissao) FROM indicacao WHERE status = '0' AND indicou_id = ".$_SESSION['s']['user']['userid'];
$sql_nao_comissao = "SELECT SUM(valor_comissao) FROM indicacao WHERE status = '1' AND indicou_id = ".$_SESSION['s']['user']['userid'];

$soma = $app->db->queryOneRecord($sql_comissao);
$soma_nao = $app->db->queryOneRecord($sql_nao_comissao);

$app->tpl->setVar('total_valor_comissionado', $soma);
$app->tpl->setVar('total_valor_nao_comissionado', $soma_nao);

}
}

But it didnt worked out yet.
Reply With Quote