I'm having the darndest time setting up a foreign key relationship with 
phpMyAdmin.

I'll try to present this succinctly and thoroughly so that someone might fish 
me out of this 
problem.  Here is my setup:

table 1: has a primary key based on two columns (one column is a varchar and 
the other is 
an enum).

table 2: I've created a primary key based on three of its columns (two of which 
I also wish 
to be foreign keys pointing to the primary keys described in table 1.

Now I am trying to create foreign keys on the varchar and enum columns of table 
2 that 
point to those in table 1.  I am able to do it just fine for the varchar 
column.  But when I try 
to set it for the enum column, phpMyAdmin gives me this error message: 

"No index defined! (name_of_column)".  (name_of_column of course being the name 
of my 
enum data type column.)

I've tried creating a normal index for this column before trying to establish 
this foreign key 
relationship.  This is what all my books tell me to do.  But I still get this 
error message.

However, when I change the data type of this enum column to something else 
(e.g., 
varchar), and point it toward a varchar column of another table, it works.  

So the only thing I can suspect (with my limited experience, of course) is that 
the enum 
data type does not like to be indexed.  However, I've seen no mention of this.  

Thanks to anyone who can help!

Sincerely,
David








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/CefplB/TM
--------------------------------------------------------------------~-> 

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to