Results 1 to 9 of 9
Thread: Inserting Help
Jan 31, 2006, 10:58 #1
- Join Date
- Dec 2005
- St. Paul, MN
- 0 Post(s)
- 0 Thread(s)
Not sure if this should be in MySQL or PHP so if I put it in the wrong place please move it to the correct location.
I have 1 database with 2 tables:
jobs table includes the following:
job_id as the pk
photos table includes:
photo id_ as the pk
I might not understand normalization correctly, but how I understand it is since multiple photos would have the same job_name a different table is required for that.
I have a form that requires the user to enter in a photo description and a job name if it is a new job - otherwise there is a drop down list that shows job names already entered. Where I am running into the problem is each time a job_name is entered it creates a new row - even if it is a duplicate name. Right now because it is entereing in a new row each time even if a duplicate job name the user has multiple of the same job name in the drop down.
What I am trying to do is is not have the same job listed in 15 different rows if there is 15 different photos from the same job. I have no idea how to go about associating 15 photos to the same job_id and job_name so a new row is not created each time.
If looking at the query I am using is needed please let me know and I will add it.
Thanks in advance for any help with this.