gminaker / databases

0 stars 0 forks source link

Add Items Errors #25

Closed anniechen92 closed 9 years ago

anniechen92 commented 9 years ago

Attempted to: Add an item Input: UPC: 123456789345, CD, Title: Happy&Puppy, Category: Country, Company: Partyville, Year: 2005, Price 58, Stock 32 Expected: Something about item being added Result: Warning: array_push() expects parameter 1 to be array, null given in C:\Users\Annie\databases\views\manager\add_items.php on line 138

Attempted to: Add a (really old) item Input: UPC 456789123456, CD, Beauty and the Beast, Classical, Disney, Year: 1235, 10, 3 Expected: Item successfully added Result: Error: Error: %s. Error: Out of range value for column 'year' at row 1

mikegfink commented 9 years ago

Recall piazza posts that we don’t need to add new items just update the stock. Please specifically read the instructions for adding items. They are very particular.

anniechen92 commented 9 years ago

Sorry... re-tested with existing item, but it still doesn't work.

(I'm assuming that the items being re-stocked will have the same UPC as the original item, which is usually the case)

Also, is there a reason why the price has to be a whole number?

Input: Item with UPC 213469245706 Result: Error: Error: %s. Error: Duplicate entry '213469245706' for key 'PRIMARY'

mikegfink commented 9 years ago

Price definitely shouldn’t be a whole number... I initially set the table as a real number with up to 2 decimal points, not sure what it is right now.