myLittleTools Community Forum

Welcome Guest Search | Active Topics | Members | Log In | Register

How can i make a relationship? Options · View
DrZ3D
Posted: Thursday, July 19, 2007 12:21:57 PM
Rank: Newbie
Groups: Member

Joined: 7/19/2007
Posts: 4
Points: 0
Location: Austria
Hi
I have a host working with mylitteleadmin and i creat some tables.
now i wanna make some relationship betwin the tables but i don't know how please help me to learn it.
my mylittleadmin is 3.1
thanks
elian
Posted: Thursday, July 19, 2007 1:36:17 PM

Rank: Administration
Groups: Administration

Joined: 9/11/2006
Posts: 605
Points: 649
Location: Enghien Les Bains, France
In your tables list, click on the table name.
In the pop-up menu, choose Details.
Click on Keys.
You can now create a new Foreign Key or Primary Key.

Hope this helps.
DrZ3D
Posted: Friday, July 20, 2007 12:54:00 AM
Rank: Newbie
Groups: Member

Joined: 7/19/2007
Posts: 4
Points: 0
Location: Austria
Thanks
cawleymj
Posted: Wednesday, September 16, 2009 4:01:03 PM
Rank: Newbie
Groups: Member

Joined: 9/16/2009
Posts: 2
Points: 6
Location: Liverpool
How do you create a compound foreign key constraint of 4 columns or more? The interface only allows for 3.
cawleymj
Posted: Wednesday, September 16, 2009 4:23:08 PM
Rank: Newbie
Groups: Member

Joined: 9/16/2009
Posts: 2
Points: 6
Location: Liverpool
I answered my own question! Anyone else wondering same thing, just replace the bits in square brackets with your table/field names.

ALTER TABLE [Foreign Key Table]
ADD CONSTRAINT [Constraint Name]
FOREIGN KEY ([Field_1],[Field_2],[Field_3],[Field_4])
REFERENCES [Primary Key Table]([Field_1],[Field_2],[Field_3],[Field_4])
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Theme created by myLittleTools
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.