silvercover Posted November 4, 2009 Share Posted November 4, 2009 Hi, I have 2 related forms connected to 2 joined tables. what I want to know is that how can I code to insert submitted forms in joined tables with the same auto incremented value as a primary key for main table and foreign key for joined table? as you know, upon submission there is no auto generated primary key value to be used in other table for joining purpose. What should I do? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/180322-2-forms-and-2-joined-tables/ Share on other sites More sharing options...
Mchl Posted November 4, 2009 Share Posted November 4, 2009 If you're using mysql, use mysql_insert_id / mysqli_insert_id Quote Link to comment https://forums.phpfreaks.com/topic/180322-2-forms-and-2-joined-tables/#findComment-951249 Share on other sites More sharing options...
silvercover Posted November 7, 2009 Author Share Posted November 7, 2009 Thank you Mchl for your reply. but is that reliable enough to be used for almost 100 concurrent users? Quote Link to comment https://forums.phpfreaks.com/topic/180322-2-forms-and-2-joined-tables/#findComment-953095 Share on other sites More sharing options...
Mchl Posted November 7, 2009 Share Posted November 7, 2009 Yes it is. It is a per connection value, so different users don't interfere with each other. Quote Link to comment https://forums.phpfreaks.com/topic/180322-2-forms-and-2-joined-tables/#findComment-953109 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.