This topic is locked

Many to one and one to one relationships

3/5/2010 6:40:00 PM
PHPRunner General questions
G
GBRunner author

Hi,
If a one to many relationship is setup by using the Master --> Details fields in the Table Links Properties window, how is a one to one relationship setup?
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=13981&image=1&table=forumtopics' class='bbc_emoticon' alt='B)' />

Sergey Kornilov admin 3/5/2010

One-to-one and one-to-many relationships are setup exactly the same way.
If your question is how you can ensure that there is only one detail record - it's a different story. It would help if you explain what are your master and details tables are and what's the logic behind your app.

G
GBRunner author 3/5/2010

As an example one Country has many towns = one to many. Each town has one zip code and each zip code has one town = one to one.