<?php
// require_once('basic-function.php');
class settings extends basicFunction 
{
    use table_names;

    public function affiliate_percent($percentage)
    {
        $vals = [$percentage];
        $if_empty = $this->if_empty($vals);
        if (!$if_empty) {
            return $this->errorMsgs(1);
        }
        $fields = ['referrer_percentage'];
        $values = [$percentage];
        $update_user = $this->update_where( $this->settings_tb,$fields,$values,'id',1);
        if($update_user['error'] == 1){
            return $update_user;
        }
        return $this->successMsg3('Affiliate Commission Updated');
    }
    
}
$settings = new settings();