if($edit_id) {
db_update_assoc('~table_name~', $data, 'where id=%i', $edit_id);
message('~singular cap~ updated.');
} else {
db_insert_assoc('~table_name~', $data);
message('~singular cap~ saved.');
if($edit_id) {
db_update_assoc('~table_name~', $data, 'where id=%i', $edit_id);
message('~singular cap~ updated.');
} else {
db_insert_assoc('~table_name~', $data);
message('~singular cap~ saved.');