You’ll want to use the database class, if you’re working in your template make sure php is enabled.
Given below is a very rough example that only updates the value of the custom profile field 42 (not showing where the member ID nor other values come from):
global $DB;
$where_clause = "member_id = '" . $id_from_someplace . "'";
$data = array('m_field_id_42' => $myjunk);
$sql = $DB->update_string('exp_member_data', $data, $where_clause);
$DB->query($sql);Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.