Update the sql and smooth the add item code.