I'm working with small relationships and I noticed that in a state table where I've related the id
field to the país[id]
table I get this error or alert message, I'm not sure. Already in a relationship of table cidade
to table estado[id]
I do not have this error.
Can you help me to know why this error occurs in the estado - país?
My SQL is this:
$criar = "CREATE TABLE IF NOT EXISTS $aonde.$tablee (
id INT(6) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,
nome VARCHAR(75) DEFAULT NULL,
uf VARCHAR(5) DEFAULT NULL,
pais INT(6) UNSIGNED ZEROFILL DEFAULT NULL,
PRIMARY KEY (id), KEY fk_Estado_pais (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=28";