Function not working

Discussion in 'PHP' started by Pandy90, Aug 19, 2010.

  1. #1
    I am using a function which gives each users the money for the percentage they earned.

    But it just seems to add nothing to their money
    Here is the part of the code that does it...

    $ocmoney1 = rand(130000,160000);
    $cash = $total * 70000;
    $cashed = $cash / 2;
    $cashs = rand($cashed, $cash);
    
    $lmoney = ($cashs / 100) * $l_price;
    $wemoney = ($cashs / 100) * $we_price;
    $eemoney = ($cashs / 100) * $ee_price;
    $dmoney = ($cashs / 100) * $d_price;
    
    $leader_money = $fetch->money + $lmoney;
    $we_money = $we->money + $wemoney;
    $ee_money = $ee->money + $eemoney;
    $driver_money = $driver->money + $dmoney;
    
    mysql_query("UPDATE users set money='$leader_money' WHERE username='$username'"); 
    mysql_query("UPDATE users set money='$we_money' WHERE username='$oc->we'"); 
    mysql_query("UPDATE users set money='$ee_money' WHERE username='$oc->ee'"); 
    mysql_query("UPDATE users set money='$driver_money' WHERE username='$oc->driver'"); 
    PHP:
    The money section is 'decimal' - 0,65

    What is wrong with this?

    Thanks
     
    Last edited: Aug 19, 2010
    Pandy90, Aug 19, 2010 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    can you elaborate more? im not getting it with your explanation
     
    bartolay13, Aug 19, 2010 IP