Jump to content

Database table creating


sager29

Recommended Posts

Say I want to create a staff directory database with two tables.  One that has their addresses and one table with there likes and dislikes.

I'ld need some sort of Member_ID column in each of my tables.  Is there a way to INSERT from a html form into two tables. 

Any suggestions would be appreciated.

Link to comment
https://forums.phpfreaks.com/topic/75988-database-table-creating/
Share on other sites

HI,

It is better if you use two tables. cus any empployees has only one address and when it changes you can update it. however,each employee has different and several likes and dislikes ..hence , it is better to save those records in a separate table. You have to make primary key in first table (for example, emp_id) and forign key in the second table which stores employee ids.

 

First Table:

Emp_id

first_name

last_name

address

gender

etc

 

Second Table:

ref_Emp_id

likes/dislikes //this has to be of boolean data type

content //this field will save what he/she likes or dislikes

etc

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.