I'm not sure whether this is right place to ask this sort of question but I have to ask...
I am to make a database based web site for a friend of mine who owns a shop...
Well I know how to make it but there is a glitch: he wants to award buyers some credit points for every bought product for purpose being able to reward them like Who first buys for 1000 $ gets a free DVD player or something similar...
The thing I was going to do is like this:
1. To make one or more tables where items in his shop are stored
2. To make one table where details of a users are stored
3. To make a field in this second table where details of purchases are stored
He asked me to do the following: to make possible to make a list where he can see who both the most of certain item: like a top list of a sort...
So I was going to make the field for purchases text like where I would store data like
number of points:item id|number of points:item id|...
and so on...
The I would use double explode to extract data from that field and then sorting it out to make a list for each item if needed...
No need to point out that it seems like a rough solution but it was the first (and for now the only) one that came to my mind...
I was going to do it like this because there is no telling how many items he is going to have in his store so I can't be limited in this writing this system and this way it seems I wouldn't...
Does anybodu have a better idea? If any extra explanation is needed I will be more than happy to offer it...
Thanx in advance for any fresh ideas...