fxuser Posted February 5, 2011 Share Posted February 5, 2011 Hello, i just realised that when i do 2 INSERTs in the same time in the database only the one of them appears to be inside andn the other just dont get in.. the code is simply $query1 = "INSERT INTO table1 VALUES('','$stuff1','$stuff2')"; $result1 = mysql_query($query1) or die(mysql_error()); $query2 = "INSERT INTO table2 VALUES('','$stuff2','$stuff2')"; $result2 = mysql_query($query2) or die(mysql_error()); all names are random. i see that sometimes both will be executed but other times only 1 will go through... what can cause this? Quote Link to comment https://forums.phpfreaks.com/topic/226778-problem-with-insert-queries/ Share on other sites More sharing options...
Pikachu2000 Posted February 5, 2011 Share Posted February 5, 2011 Is that the actual code you're using? Quote Link to comment https://forums.phpfreaks.com/topic/226778-problem-with-insert-queries/#findComment-1170235 Share on other sites More sharing options...
fxuser Posted February 5, 2011 Author Share Posted February 5, 2011 Is that the actual code you're using? no its not , its the same concept , simple INSERT into database in 2 different tables one look like: $insert_pms_data = ("INSERT INTO my_pm_data VALUES('','$msg_id','$email','$explode_recievers[$msg]','0','1','0','0','0','0','0','0')"); Quote Link to comment https://forums.phpfreaks.com/topic/226778-problem-with-insert-queries/#findComment-1170266 Share on other sites More sharing options...
fxuser Posted February 6, 2011 Author Share Posted February 6, 2011 bump Quote Link to comment https://forums.phpfreaks.com/topic/226778-problem-with-insert-queries/#findComment-1170604 Share on other sites More sharing options...
fenway Posted February 13, 2011 Share Posted February 13, 2011 Echo the actual statements. Quote Link to comment https://forums.phpfreaks.com/topic/226778-problem-with-insert-queries/#findComment-1173584 Share on other sites More sharing options...
Pikachu2000 Posted February 13, 2011 Share Posted February 13, 2011 If you aren't going to provide the actual code, there's nothing to bump. Quote Link to comment https://forums.phpfreaks.com/topic/226778-problem-with-insert-queries/#findComment-1173625 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.