Jump to content

Set same userID in two diffrent tables within the same database


HardCoreMore

Recommended Posts

Hi, how can i when user register and get unique userID to set userID to be the same in both tables in mysql. Here is how my tables look like:

tables.jpg

When user register i use users table to store data about the user and i have two same columns called userID in users table and user_docs table. How can i enter at the same time userID in users and user_docs table when user register. Should i use php for this or i should set it up in mysql. This is the query that i use to enter data in users table

 

mysql_query ("insert into users set name = '$user', password = password('$pass'),email = '$email'");

 

What query should i run or how to set it up?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.