Hi Christopher, * * *That is pretty much what I am after.* * * *table = keywords values ('Art', 'Games', 'Money') # Used to find all ads related based on keywords they select* *table = ad (* * url,* * created_by* * keywords - can have 0 or more keywords, keywords can belong to 0 or more ad's* *)* *table = ad_keyword value (ad.id = 1, keyword.id = 1) etc...* * * *form:* *url* *created_by = logged in member* *keywords = shows a list of existing keywords, or uses auto completion, [can select 0 or more and create a new keyword if not exist] if the keyword does not exist it is inserted (only inserted as a new keyword not linked to * *this ad until the ad is saved). **you then save the ad, and add the record to ad_keyword table....* * * *If the above is still not clear let me know and I will try to figure out a different way to explain it. If I can't think of a better way to explain I will just write working code and provide it once it is done :)* * * *--* *Regards,* *Bruce* * * On Sun, Dec 25, 2011 at 11:11 PM, Christopher Steel <chris.st...@gmail.com>wrote:
> I think what you mean to say is that you are are looking for the ability > to make multiple selections in one or more tables using a single form that > allows you create a user record. > > So for example a table of users, a table of email address types and a > table of email addresses but the user on see a single form where they can > enter their name and one or more email addresses and email address types. > Does that sound about right? > > This is a bit different then a many-to-many database relationship. > Actually in your form I do not see any things that appear to be what are > commonly referred to as many-to-many relationships in database theory. > > Here is what Wikipedia has to say about database many-to-many > relationships: > http://en.wikipedia.org/wiki/Many-to-many_%28data_model%29 > > From my understanding in classic database theory we talk about many to > many 'relationships' and the 'relationships are recorded to a third table. > The tables to the left and right of the relationship table both have what > resembles a many to one relationship with the "middle" table but they have > a many to many relationship with one another. The relationship table is > what allows for the many to many relationship. > > For example: > > table one = products > table two = purchases > table three = buyers > > or > products <--> purchases <--> buyers > > so if products contains soap and john buys some soap then we have the > following entry in the purchases table: > john, soap > but we could also have > jill, shoes > jill, soap > and so on > > -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.warplydesigned.com http://www.fitnessfriendsfinder.com