'anonymous user' AND name <> 'authenticated user'"); while ($row = db_fetch_array($result)) { $role_id = $row['rid']; $role_id_uncate = $role_id . "--0"; $result_term = db_query("SELECT name, tid FROM {term_data} WHERE vid ='%d'", $row_vid ); variable_del($role_id_uncate, $form_state['values'][$role_id_uncate]); while ($row_term = db_fetch_array($result_term)) { $cat_tid = $row_term['tid']; $cat_tid_field = $role_id . '--' . $cat_tid; variable_del($cat_tid_field, $form_state['values'][$cat_tid_field]); } } } /** * Implementation of hook_schema. */ function user_points_by_role_schema() { $schema['user_points_by_role'] = array( 'fields' => array( 'pid' => array('type' => 'serial', 'length' => 11, 'not null' => TRUE, AUTO_INCREMENT, ), 'uid' => array('type' => 'int', 'length' => 11, 'not null' => TRUE), 'role' => array('type' => 'int', 'length' => 11, 'not null' => TRUE), 'tid' => array('type' => 'int', 'length' => 11, 'not null' => TRUE), 'points' => array('type' => 'int', 'length' => 11, 'not null' => TRUE) ), 'primary key' => array('pid'), ); return $schema; }