My boss was asking me to relate two tables in PHP and from what he explains, it just seems like two non-linked-non-related tables. What is the advantage of relating tables then? Does anyone have a code for this?
the main reason i would see why he wants it is because of duplicate data. There is no point in having the same data in two tables when all you have to do is relate a specific key to identify whom the record belongs to.
There is no one example of this. What you can do is:
say you run a store and track customers by a customer ID. Then you would have to relate that value to another record in a table for lets say their contact information. This way you will not have one huge recordset and you can get all that information about that customer with a join query.