View Full Version : Please Help me in PHP Coding
08-23-2011, 10:17 AM
how can I give foreign key relation?
08-23-2011, 05:17 PM
I'm guessing here.
A foreign key relates to the primary key in a different table. It's used to link the two.
Your user database stores information about your customers like name, email, password and should have a primary key ID number to identify the user. When he/she logs in you get this id and use it instead of a name.
Now the second table maybe a team the user belongs to, a list of work assignments for them, any thing that relates to a user. This is the foreign key resides and when you write the order or the assignment to this table you insert the user id in the foreign key column to link them.
Hope this helps.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.