fetches to database the order