Linuus Posted September 10, 2010 Share Posted September 10, 2010 Hi! Let's say I'm building a site about insurances. The end user should be able to enter some options to see what's the cheapest insurances to get (this is an example). Table 1: companies Hold the data about all the companies Table 2: insurances Holds the data about the insurances. It's related to Table 1 using a 'company_id' field. Some insurances demands the customer to be a Student, of a certain age, Sex and so on. The issue is that they have different demands, like this: Insurance 1 demands: (Student AND Sex) OR 65 years old Insurance 2 demands: Student OR Sex OR 65 years old Insurance 3 demands: Student AND Sex ...and so on. Somehow I have to save the relations between the demands. It would have been easy if it was only "All demands" or "One of the demands" but it might not be like that... So, any ideas? :-\ Quote Link to comment https://forums.phpfreaks.com/topic/213073-how-should-i-set-this-up/ Share on other sites More sharing options...
fenway Posted September 10, 2010 Share Posted September 10, 2010 An EAV table might work. Quote Link to comment https://forums.phpfreaks.com/topic/213073-how-should-i-set-this-up/#findComment-1109667 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.