View Full Version : script to get ID then continue to page.

07-27-2009, 08:55 PM
I'm sure i'm making this more complicated than necessary, but If someone could help me with this I would VERY much appreciate it.

I have a button that says to "add job". It adds jobs under a master TicketID since each TicketID can have multiple jobs attached to it. It also points to a php page that is a form to input job information that then inputs into multiple relational databases with the tie in across all these DBs being the JobID which Auto_Increments in the central table when the new job is created. Sorry if that explanation made your head hurt, mines been hurting for over a week sorting all this out.

I need to somehow start the Data Insert to get the JobID before I open the page so that I can have that JobID to pass when I do the full form insert into the different tables.

Any ideas? I found a script that uses PHP's mysql_insert_id however I'm concerned that with having multiple Sales Reps in multiple locations, I runt he risk of having conflicting data if two or more are updating at the same time.

07-28-2009, 06:00 PM
now that i'm thinking about this, could a MOD please move this to the mySQL forum?