Hi I am using Navicat and have two tables that have a one to many relationship. I have a table called rlbbulbs and a table called rlbbrand. brandID is the primary key in rlbbrand and is supposed to be the foreign key in rlbbulbs. Navicat has a way of creating foreign keys, which I went through and did, I think, but there is no marker or way to let me know if that column IS a foreign key or not. I thought I had set a restraint on this column that when inserting new records in the rlbbulbs table, that it had to have a record for the brandID(foreign key) column. I doesnt restrain me from doing that. I can insert records and leave the brandID column blank. I dont want this. I also tried doing this in PHPmyAdmin, but it gave me an error.
ALTER TABLE rlbbulbs ADD FOREIGN KEY ( brandID ) REFERENCES rlbbulbs( brandID ) ;
The error said:
#1005 - Can't create table 'rlb.#sql-8f0_37' (errno: 150)
I have looked through PHPmyAdmin several times and havent found a way to select foreign key for this column. There is a little key icon for Primary keys, but not foerign keys. Thanks for any help!