I am trying to follow your logic, and I have thee questions for now. I'm sure I'll more to ask later. What is the significance of recipe_id? How is this number generated? Right now, all the rows have values of 0.
Here's the more pressing need: I have three tables that need to relate to one another. Here's the structure:
Table CourtneyTechs is the master file and has TechNum & CellNum among other fields. TechNum is the primary key, but CellNum is also unique.
Table CallCount is one data file with 57,215 records, keyed to IdNum containing CellNum & data fields.
Table WorkOrders is another data file of the same size, keyed to IdNum, and containing TechNum & data fields.
What I need to happen is this: CourtneyTechs says to CallCount: "Here's the CellNum for tech John Smith. Give me all the rows that have the same CellNum. Then, I need CourtneyTechs to say to WorkOrders: "Here's the TechNum for John Smith. Give me all the rows that have the same TechNum, and so forth until the all the rows in CourtneyTechs have been processed.
I was able to create the two tables with the and import the .csv files I have. Now, my 2nd question is: After I created the two tables with Foreign Keys, Navicat says that the name of one foreign keys is "1workorders_ibfk_1", and the name of the 2nd table is equally puzzling. How is that name generated, and what is its significance?
Oops, I need to ask a 4th question: How do I get the data out of the two tables? If I execute a 'SELECT * ' on CourtneyTechs will that automatically pull the data from the two subjugated tables? I would assume so, but asking almost never hurts.
Oh No!! Number 5! If I set up a form to insert data, how would MySQL know to call up another row? Is this automatic, or does some trick with PHP need to be executed?
Are all these questions as clear as mud? The answers will probably be long enough to write a master's thesis, when I'm just a lowly apprentice. Thanks as always for all the help.
tim