add widget and update the sql data