You are here

function contribute_get_needed in Contribute 6

File

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

Code

function contribute_get_needed($nid) {
  $result = db_query('SELECT total,budget FROM {contribute_contribution_recipients WHERE nid=%d}', $nid);
  $values = db_fetch_array($result);
  $needed = $values['budget'] - $values['total'];
  return $needed;
}