Jump to content

problem with INSERT queries


fxuser

Recommended Posts

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?

Link to comment
Share on other sites

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')");

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.