Autonumber and relationship

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
szms
Forum Contributor
Posts: 101
Joined: Thu Jun 26, 2003 12:23 pm

Autonumber and relationship

Post by szms »

I am dealing with 3 tables; Child, Guardian and Link. Here is the field that I am using for those tables.

Child: Child_ID(PK & autonumber), ChildName (Text)
Guardian: Guardian_ID(PK & autonumber), GuardianName (Text)
Link: Child_ID (FK & number), Guardian_ID (FK & number)

As you can see that I am trying to implement many to many relationship.

Now I want to insert data (using form in MS Access) in such a way so that Link table can be filled up by itself. That means my form will be shown only ChildName and GuaridanName. How to do that?
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

well..
what do you mean with "I want to insert data (using form in MS Access) in such a way so that Link table can be filled up by itself" ?

make a form... populate two combobox with the child and the guardian...
(search the forum for how to populate a combo.. here you have some reference viewtopic.php?t=7113&highlight=combobox )

then just insert both ids (fetched form de $_POST.
szms
Forum Contributor
Posts: 101
Joined: Thu Jun 26, 2003 12:23 pm

Post by szms »

A moke up would be very helpful for implementing my datavase.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Usefull mysql_function LAST_INSERT_ID;
szms
Forum Contributor
Posts: 101
Joined: Thu Jun 26, 2003 12:23 pm

Post by szms »

I am trying to implemant this database using MS Access. Thank you.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

i think this is a php forum
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

magicrobotmonkey wrote:i think this is a php forum
?
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

access isnt php
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

mySQL isn't either, nor is Oracle, SQLite, FoxPro etc. etc., but PHP can interface with all of them (and more).
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

yea but hes not asking how to interface php with it
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

I don't see anything indicating that he is not.

I suggest we leave it at this, magicrobotmonkey, so the thread doesn't get derailed any further.
Post Reply