|
-
Jan 30th, 2011, 05:35 AM
#1
Thread Starter
Hyperactive Member
Auto insert record
I have 2 tables
Register (email , username , pass )
Userprofile ( email , userimage)
I want that if user register then email from register table automatically insert into the userprofile table
is it possible ?
and i don't want to fire 2 querryr at register button
Thanks
-
Jan 30th, 2011, 06:20 AM
#2
Re: Auto insert record
Duplicating data like that is a bad idea. You should have a column in the secondary table that can store the primary key from the primary table. That's a foreign key. If you need data from both tables you execute a query with a join.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|