0

Hi, thanks in advance foy your time.

I have in the past made a inventory site where a user selects from a dropdown what he or she has and saves it but this is a little different...

What I'm attempting to do is this...

User creates an account (have the ability to do this already)
User pulls up a list of items (have database populated with itemid, name, image and url)
User is able to input if they have it, need it, or saving to buy it.
User then can SAVE their inventory/wishlist so it can be brought back up at a later date.

ex.
User: John Doe
Item 1: have
Item 2: want
Item 3: have
Item 4: saving for

etc

Also on this the item list would be growing continuously so it has to be able to be reflected on their inventory/wishlist.

Any questions or don't quite understand please feel free to leave me a question.

Thanks again

3
Contributors
3
Replies
25
Views
2 Years
Discussion Span
Last Post by diafol
0

There are so many ways to deal with this. If I were to implement it, I would break this down into multiple tables (for future expansion).

Tables
1)users -- user_id, other_fields
2)items -- item_id, other_fields
3)user_items -- user_id (foreign key), item_id (foreign key), status_id (foreign key)
4)statuses -- status_id, description (i.e. have, want, saving for, etc)

In this case, the item will become not-have for a user if there is no item_id+user_id in the database. I can expand type of status in statuses because it is just a link in user_items. However, if you don't want too many tables for now, you could merge #3 and #4 together.

0

@Taywin

I like the table layouts as you are mentioning above. Do you perhaps know of any examples of how to implement them into a webpage so it integrates them together.

Thanks for your help

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.