function radioactivity_get_energy in Radioactivity 5
Same name and namespace in other branches
- 6 radioactivity.module \radioactivity_get_energy()
Reads energies for a node. Returns array of $dpid => $energy
1 call to radioactivity_get_energy()
1 string reference to 'radioactivity_get_energy'
File
- ./
radioactivity.module, line 490
Code
function radioactivity_get_energy($oid, $oclass) {
$ret = array();
// remap id if necessary
$oid = _radioactivity_possibly_remap_id($oid, $oclass);
$result = db_query("SELECT decay_profile, energy FROM {radioactivity} WHERE id=%d AND class='%s'", $oid, $oclass);
while ($row = db_fetch_object($result)) {
$ret[$row->decay_profile] = $row->energy;
}
return $ret;
}