$old_url, '@new_url' => $new_url))); db_query("UPDATE {files} SET filepath=replace(filepath, 'sites/%', 'sites/%')", $old_url, $new_url); db_query("UPDATE {users} SET picture = replace(picture, 'sites/%s', 'sites/%s')", $old_url, $new_url); variable_set('files_directory_path', "sites/$new_url/files"); variable_set('files_directory_temp', "sites/$new_url/files/tmp");