[Q]Best practice to insert record into multiple tables with transaction control?
I need your expertise to guide me to go through the following scenario. I have seen very few groups so dynamically involved to help each other. And needless to say some of the answers are top class (By that I meant it is exact enough to solve the problem of the user that posted the problem). Hence hoping a response from you. Now here is the scenario.
- After the user submits form, the values should be inserted in multiple tables. [e.g. A user information goes into userBasic table and userDetails table]
- How to incorporate transaction control process in the scenario [i.e. no mishaps take places]
- What is the best practice to do that? [I mean step 1 and 2]
- Any version restrictions. [I am using PHP Version 4.4.2 and MySQL version 4.1]
- Any working code example [That will be very much appreciated]
I know I am not alone in this sort of case. Looking forward to get some responses.