Help - Search - Members - Calendar
Full Version: Foreign Keys
The Uniform Server BBoard > Support > Uniform Server - Windows > MySQL
carlyman
When creating a table with foreign key constraints, the table is created successfully; however, the constraints don't hold true. For example, when inserting values into the new table, the values inserted should match the referenced values. This is not happening.

Here is an example of my statement:
CREATE TABLE test (a int, b int, c int, FOREIGN KEY (a,b) REFERENCES test2(e,f))

Would the Uniform Server package be affecting this at all? Or, perhaps I am dong something wrong?

Thanks for your help,
JC
olajideolaolorun
I do not think it is the Uniform Server. I use KEYs a lot, and mostly PRIMARY KEYs but everything works fine. It may also depend on the version of MySQL running... Please look into that.. or test it with an example from the MySQL site/doc.

Thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.