When trying to add a foreign key to a table field and if the table names contain a dot, then the generated SQL command is wrong.
DB: nfltlgl
Tables: nfl.seasontypes; nfl.season
Wanted foreign key for `nfl.season`.`type` is `nfl.seasontypes`.`type`
phpmyadmin:
ALTER TABLE `nfl.season` ADD FOREIGN KEY ( `type` ) REFERENCES `nfltlgl`.`nfl` ( `seasontypes` );
correct:
ALTER TABLE `nfl.season` ADD FOREIGN KEY ( `type` ) REFERENCES `nfl.seasontypes`(`type`);
So phpmyadmin somehow splits the table name instead of using it completely.
Workaorund is too use "nfl_" as a prefix and avoid dots in table names.
Hmmm, I was sure that dots were not allowed in table names, but they are since MySQL 5.1.6:
http://dev.mysql.com/doc/refman/5.1/en/identifiers.html
But phpMyAdmin does not support these, yet.
Fixed in subversion, thanks for reporting.