Adding select all function to database