db_update not working as expected I am trying to develop a custom module; so far it works as it should. The only problem is I can't seem to get the MAC address to remain unchanged on update. It keeps getting the device ID number instead of the MAC field. How do I avoid the MAC address is changed?

function device_delete_request($uid = null, $macaddress, $device_id = null) {
  db_update('argon_user_stuff')
    -&gt;fields(array(
      'id' =&gt; $device_id,
      'uid' =&gt; $uid,                 
      'macaddress' =&gt; $macaddress,
      'deletedmacaddress' =&gt; $macaddress,
      'updated' =&gt; REQUEST_TIME,
      'deleted' =&gt; REQUEST_TIME,
      'active' =&gt; 0
    ))
    -&gt;condition('uid', $uid, '=')
    -&gt;condition('id', $device_id, '=')
    -&gt;execute();


    // Set the message and return to the user's profile page
    drupal_set_message('Device deleted');
    return drupal_goto("user/{$uid}/devices");

}
Is that mac address is a required field?
It may be possible mac address passing to this function not getting change, you may need to debug mac address before the function call.