function db_set_user_setting

6.x db_set_user_setting($user_id, $var_name, $value)
4.x db_set_user_setting($user_id, $var_name, $value)
5.x db_set_user_setting($user_id, $var_name, $value)
1 call to db_set_user_setting()
student_search_display_majors_search in modules/student_search/student_search.module
Display the majors search sub-tab, where we can select a major and see the students assigned to it.


includes/, line 784
This file contains mostly db shortcuts.


function db_set_user_setting($user_id, $var_name, $value) {
  $settings = db_get_user_settings($user_id);
  $settings [$var_name] = $value;

  $ser = serialize($settings);

  db_query("DELETE FROM user_settings WHERE user_id = '?' ", $user_id);
  db_query("INSERT INTO user_settings (user_id, settings, posted)
            VALUES ('?', '?', '?') ", $user_id, $ser, time());