close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Parent Child Tables

Thread began 4/21/2010 11:39 pm by lilyvo30405875 | Last modified 4/23/2010 11:22 am by lilyvo30405875 | 4580 views | 7 replies

Jason ByrnesWebAssist

A child table uses a foreign key to relate records to the parent table.

for example, lets say you had users and user groups.

To create a one to many relationship of User Groups to Users, the User Groups table would be the parent table, the users table would be the child table.

Both tables will have a primary key column which is an auto number column, the users table will a foreign key column used to relate the user to the user group. In this column, you will store the value from the UserGroups Primary key column for the group the user should belong to

userGroupID - primary Key
userGroupName - text

userGroupID | userGroupName
1 | Administrator
2 | Power User
3 | User

userID - Primary Key
userUserGroupID - Foreign key - relates to UserGroups.userGroupID

userID | userUserGroupID | userName
1 | 1 | Jason
2 | 1 | John
3 | 3 | Adam
4 | 2 | George
5 | 3 | Tom

In the sample data above our users are members of the following user groups:
Jason - Administrator
John - Administrator
Adam - User
George - Power User
Tom - User

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...