未分類

PHP Function 遞迥

// 下線總金融
function fun_ckcash(&$sum,$pid){
        $query = "SELECT * FROM tb_member WHERE m_upuser = $pid";
        $result=mysql_query($query);
        $loop = mysql_num_rows($result);
        for ($i=0;$i<$loop;$i++){
            $row = mysql_fetch_assoc($result);
            $sub = $row['m_credit'];
            $sum = $sum +  $sub;
            $id = $row['m_sn'];
            fun_ckcash($sum,$id);
        }
    }