derrick24 Posted March 15, 2008 Share Posted March 15, 2008 This is more of a concern of mine, and I'm not too sure of how to even ask this question. I have at the start of my script a normal connect to the database connection that can be used though out the remainder of the script by various functions (so basically any function can simply pull the data it requires without having to connect every time) Now my concern is that I need to use "mysql_insert_id", if I have multiple uses inserting records in the database using the same connection started at the top of the script. Is that going to cause a conflict. ie: if userA inserts record 1 and userB insert record 2 at the same time. will userA still get a return id of 1 and userB a return id of 2 and not both get a return of 2 for example? Link to comment https://forums.phpfreaks.com/topic/96299-its-a-dumb-question-but-i-dont-know-the-answer-mysql_insert_id/ Share on other sites More sharing options...
BlueSkyIS Posted March 15, 2008 Share Posted March 15, 2008 each user runs the script individually. they each get their own "version" of the code and any connections made through the script. therefore, they don't share the same connection to MySQL and shouldn't interfere with each other in the way you describe. Link to comment https://forums.phpfreaks.com/topic/96299-its-a-dumb-question-but-i-dont-know-the-answer-mysql_insert_id/#findComment-492935 Share on other sites More sharing options...
derrick24 Posted March 15, 2008 Author Share Posted March 15, 2008 Cool, thank you very much! Link to comment https://forums.phpfreaks.com/topic/96299-its-a-dumb-question-but-i-dont-know-the-answer-mysql_insert_id/#findComment-492937 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.