JOINING? Would it be a join that I would use to get the 'cust_id' (auto-incremented from Mysql) from table CUSTOMER into the other tables of CARD PAYMENT & CUST ORDER. If so, how? Also, does this work even if they are queried at the same time?



// database connection
mysql_connect("$host","$user","$pass" );
// database selection
mysql_select_db($database);

// Insert customer information
mysql_query("INSERT INTO customer VALUES(
'$cust_id',
'$posted',
'$firstname',
'$lastname',
'$company',
etc...

// Insert payment
mysql_query("INSERT INTO card_payment VALUES(
'$posted',
'$cust_id',
'$cart_id',
'$total')" );

// Insert customer order
mysql_query("INSERT INTO cust_order VALUES(
'$posted',
'$cust_id',
'$cart_id')" );