Need a little database help!
I'm doing an inventory system project, and I've already done the part where product balances can be checked out or checked in.
However, I'm trying to record the transactions now and I'm abit stumped because 1 transaction may 1 or more product and value.
For example, withdrawal Transaction A:
1. Pots - 10, 5
2. Pans - 4
3. Plates - 20
As the number of items in the transaction can vary from 1-50, the only way I thought that it's possible to store the transaction in one table row, is to use tokens.. but that would be messy. Anyone got a cleaner way of doing this?
Thank you for reading!
one to many relationships?
just give each transaction a primary key, then make a second table for items in the transaction, which has the foreign key matching it up to the transactions table. problem solved.
If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
The same applies to HTML and the forums [HTML][/HTML] tags.
I kinda forgot all the database stuff I learned.. XD
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)