thanks to all.
i just did some convoluted cfif statement that will get me through the day.
i will go back & look at your suggestions, & come up with a better solution.

this list is a great place to vent, spout & laugh at ones self.

-paul

an unofficial user friendly signature...
web developer, nbbj
work:   [EMAIL PROTECTED]
        614 241-3534
fax:    614 485-5534

home:   [EMAIL PROTECTED]
        614 449-1681

> icq:  47658358


-----Original Message-----
From: Jennifer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 12:30 PM
To: CF-Community
Subject: RE: grrr.. how do i build it better.


Basically, it's a key in another table that is used in that table as well. 
Not only does it keep you from deleting from the other table if the value 
is used in the table that uses it as a foreign key, but it also checks 
against the data in the other table to make sure its correct.

So in the example below you have an instructor named Milton Keynes and you 
want to make a new class called Keynesiology. Lets say that you make a typo 
and you spell his name Milton Kenes. Since the instructor's name is a 
foreign key, that data is checked against the data in the other table. In 
the other table, there is no instructor named Milton Kenes, so you will get 
an error.

At 11:36 AM 5/17/2001 -0400, you wrote:
>yes, I'll try to explain as best I can.... let's say you have 2 tables....
>
>Table one has 3 fields - key, class, and instructor. key is the primary
key,
>name is the class name, and instructor is the key value from the instructer
>table. When you set the instructer column up as a foreign key, the database
>won't let you delete the record from the instructor table if that key value
>is being used in the first table. Confused?
>
>adam churvais is on this list and teaches db classess... you might want to
>hook up with him.
>
>-george
>
>
> >From: Paul Ihrig <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: CF-Community <[EMAIL PROTECTED]>
> >Subject: RE: grrr.. how do i build it better.
> >Date: Thu, 17 May 2001 11:11:16 -0400
> >
> >not sure what a foreign key is.
> >that is different from a primary key?
> >thanks
> >-paul
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to