You are here

function _radioactivity_add_energy_mysql in Radioactivity 5

Same name and namespace in other branches
  1. 6 radioactivity.inc \_radioactivity_add_energy_mysql()
1 call to _radioactivity_add_energy_mysql()
_radioactivity_add_energy_internal in ./radioactivity.inc

File

./radioactivity.inc, line 128

Code

function _radioactivity_add_energy_mysql($oid, $oclass, $dpid, $amount, $timestamp) {
  db_query("INSERT INTO {radioactivity} (id, class, decay_profile, energy, last_emission_timestamp) " . "VALUES (%d, '%s', %d, %f, %d) ON DUPLICATE KEY UPDATE energy=energy+%f", $oid, $oclass, $dpid, $amount, $timestamp, $amount);
}