Jump to content

inserting data to two tables simultaneously in different fields


deepshah2004

Recommended Posts

I would like to know what mysql statements to use when inserting data to two tables simultaneously in different fields

 

for inserting data to only one table i am using the following syntax:

 

// insert the record to the table

$insert="insert into  sales (sales_id,date,item_code,description,customer_name,customer_ac_no,quantity,unit_price,amount,discount,net_amount,terms)values('$s','$d','$i','$de','$cn','$ca','$q','$u','$a','$di','$na','$t')";

if (mysql_query($insert))

{

echo ("sale entered successfully ");

}

else

{

echo ("failed to enter the sale").mysql_error();

}

 

thanks

 

please help urgently

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.