$dt = mysql_query("SELECT * FROM `member_territory` mt LEFT JOIN `drug_territory` dt ON mt.mt_ter = dt.t_id");
while($t = mysql_fetch_array($dt)) {
$total +=($t['t_reward']* $t['mt_lev'])*150;
mysql_query("UPDATE `members` SET
`drug_income` = '".$total."',
`drug_incometotal` = `drug_incometotal` + '".$total."',
`wallet` = `wallet` + '".$total."'
WHERE `playerid` = '".$t['mt_playerid']."'");
}
So here is my code rather self explainingtary $total when inserted into drug_income
that is correct but when ever it is inserted into drug_incometotal
or wallet
its incorrect.
im not sure why and i have tried everything to my knowledge to pull my head around it!!.
Any ideas why i am getting this incorrect result ( as i say drug_income
is correct) only when i try to '+' it to something in the data base it returns an incorrect result.