You are here

function contribute_update_node_balance in Contribute 6

2 calls to contribute_update_node_balance()
contribute_contribution in ./contribute.module
contribute_nodeapi in ./contribute.module

File

./contribute.module, line 410
Lets users contribute to projects

Code

function contribute_update_node_balance($nid, $amount) {
  $result = db_query('INSERT INTO {contribute_contribution_recipients} VALUES(%d,0,%f) ON DUPLICATE KEY UPDATE total=total+%f', $nid, $amount, $amount);

  #	$result = db_query('UPDATE {contribute_contribution_recipients} SET total=%f+total WHERE nid=%d',$amount,$nid);
}