g_r_a_robinson
Regular
- Joined
- Jan 13, 2004
- Messages
- 71
This is what I'm doing and It makes sense why it doing this but I'm not sure of a solution.
Let me explain.
I have two processes.
I add a job to my db, the job contains a title, date, time etc.
When the user submits it they are returned a job number from the db. They then need to add a note that goes along with the job. This job is stored in a job table
A job can have many notes but they must add at least one, thats the default behaviour. When having submitted the note the details are stored in a note table, its foreign key is the jobid that was returned from the first insert.
IE I can access all the notes by its jobid.
The problem occurs when two people do this
User A : Adds a job
User B : Adds a job
I think user a's jobid is being written over by user b. Therefore when (user a) add a note they are actually submitting the note to the jobid of user b.
Now thats my hunch. And it certainly explains the behaviour. Problem is that I can't really afford to change the structure of the entire thing right now. What would really help is if I was able to prevent (user a's) job number from being over written. I'm using static vars.
Any suggestions would be most helpful!!
Let me explain.
I have two processes.
I add a job to my db, the job contains a title, date, time etc.
When the user submits it they are returned a job number from the db. They then need to add a note that goes along with the job. This job is stored in a job table
A job can have many notes but they must add at least one, thats the default behaviour. When having submitted the note the details are stored in a note table, its foreign key is the jobid that was returned from the first insert.
IE I can access all the notes by its jobid.
The problem occurs when two people do this
User A : Adds a job
User B : Adds a job
I think user a's jobid is being written over by user b. Therefore when (user a) add a note they are actually submitting the note to the jobid of user b.
Now thats my hunch. And it certainly explains the behaviour. Problem is that I can't really afford to change the structure of the entire thing right now. What would really help is if I was able to prevent (user a's) job number from being over written. I'm using static vars.
Any suggestions would be most helpful!!