Aralanthir
11-04-2002, 07:09 PM
Hey all,
I'm pretty new to PHP/mySQL, and I've tried searching for the answer, but I can't seem to find it. It's probably incredibly simple, but I just don't know the keywords I'm supposed to be searching for.
I want to set up a database so that there is one table which stores information about a Story (storyid would be the primary key). Then, I want to link it to another table which stores the actual contents of the story in separate chapters (chapterid is the primary key). I read some tutorials on Normalization, and it *seems* to touch on what I'm looking for - but the chapterid is set to autoincrement, and I want it to reset for each separate story.
Right now, If the first story has 2 chapters, then the first chapter of the second story would start at 3.
What am I doing wrong? Am I supposed to create a new table for the chapters for each story?
If anyone knows of any tutorials that address my question, or can answer my question - I'd greatly appreciate any help! :)
I'm pretty new to PHP/mySQL, and I've tried searching for the answer, but I can't seem to find it. It's probably incredibly simple, but I just don't know the keywords I'm supposed to be searching for.
I want to set up a database so that there is one table which stores information about a Story (storyid would be the primary key). Then, I want to link it to another table which stores the actual contents of the story in separate chapters (chapterid is the primary key). I read some tutorials on Normalization, and it *seems* to touch on what I'm looking for - but the chapterid is set to autoincrement, and I want it to reset for each separate story.
Right now, If the first story has 2 chapters, then the first chapter of the second story would start at 3.
What am I doing wrong? Am I supposed to create a new table for the chapters for each story?
If anyone knows of any tutorials that address my question, or can answer my question - I'd greatly appreciate any help! :)
