Jump to content

rituel

Members
  • Content Count

    11
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    rituel got a reaction from kokastein in #cashpoints on Herc Fluxcp ?   
    Thanks 
    I have also been able to find my mistake.
     
     
    Not work:
    if (!$this->hasCreditsRecord($targetAccountID)) { $fields = $fields = 'account_id, key, index, value'; $values = '?, ?, ?, ?'; /*if (!is_null($donationAmount)) { $fields .= ', last_donation_date, last_donation_amount'; $values .= ', NOW(), ?'; }*/ $sql = "INSERT INTO {$this->charMapDatabase}.`acc_reg_num_db` ($fields) VALUES ($values)"; $sth = $this->connection->getStatement($sql); $vals = array($targetAccountID, '#CASHPOINTS', 0, $credits); /*if (!is_null($donationAmount)) { $vals[] = $donationAmount; }*/ return $sth->execute($vals); }  
    Work!
     
    if (!$this->hasCreditsRecord($targetAccountID)) { $fields = $fields = '`account_id`, `key`, `index`, `value`'; $values = '?, ?, ?, ?'; /*if (!is_null($donationAmount)) { $fields .= ', last_donation_date, last_donation_amount'; $values .= ', NOW(), ?'; }*/ $sql = "INSERT INTO {$this->charMapDatabase}.`acc_reg_num_db` ($fields) VALUES ($values)"; $sth = $this->connection->getStatement($sql); $vals = array($targetAccountID, '#CASHPOINTS', 0, $credits); /*if (!is_null($donationAmount)) { $vals[] = $donationAmount; }*/ return $sth->execute($vals); }
  2. Upvote
    rituel got a reaction from jTynne in Feefty's FluxCP Addons Release   
    Hello :-)
     
    Fix for Unable to vote for the server. Err no. 4 ?
     
     

     
    / modules / voteforpoints / function.php
    + This module not work for Hercules ?
     
    It uses:
    if (!function_exists("getCashPoints")){ function getCashPoints($account_id, $server) { $sql = "SELECT value FROM global_reg_value WHERE account_id = ?"; $sth = $server->connection->getStatement($sql); $sth->execute(array((int) $account_id)); return $sth->rowCount() ? (int) $sth->fetch()->value : 0; }}  
     
    Hercules use: global_acc_reg_num_db  &  global_acc_reg_str_db   not global_reg_value
×
×
  • Create New...

Important Information

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