function _radioactivity_add_energy_mysql in Radioactivity 5
Same name and namespace in other branches
- 6 radioactivity.inc \_radioactivity_add_energy_mysql()
1 call to _radioactivity_add_energy_mysql()
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);
}