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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.