now gets next ordering to send to the user from the postgres database, then updates the database with the next order to use.