UBB.Dev
Posted By: pluto_rogue phpMyAdmin-table relationships - 03/03/2001 11:10 PM
Hi,

How do I set a relationship between two tables?

I have created a database in MySQL, and have created two tables within this database. Each table has an ID field which is set as Primary Key. Now I wish to 'relate' a field in one table to a field in the other table. I'd like to know how to do this using the phpMyAdmin utility and how it would be done at a command line. I get the feeling this is really simple, just can't figure it out, or using wrong syntax.

Thanks in advance.



Posted By: BillD Re: phpMyAdmin-table relationships - 03/05/2001 5:12 PM
I assume that by "relate" you mean establish a "foreign key". MySQL doesn't have foreign keys. See here for details.

Bill Dimm, MagPortal.com - [:red]free feeds for your site.
© UBB.Developers