That code doesn't work..right. What it gives me is this:
Say $storyfile = local
it will give me an output file named:
local1.html
So, it is giving me a "1" as the ID. Not the next ID in the database.
So, to answer your question, it is a auto-increment field. There will only be one person adding to the database at a time. So, it doesn't matter to me how I get the ID of the story I am adding.