query from one table and insert result into another table
Posted: Fri Nov 29, 2002 1:12 am
Would appreciate help with the following php/mysql combination:
Trying to use the form variables submitted by user form to extract the correct state_pair_price from the state_pair table, example:
<? Select state_pair_price from state_pair where origin_state=$origin_state AND destination_state=$destination_state;
Next in the same script, I would like to insert the state_pair_price result from above into the field named price in a different table named email_quotes, example:
Insert state_pair_price into email_quotes.price;
?>
Both tables above reside in same database.
Any help would be appreciated.
Trying to use the form variables submitted by user form to extract the correct state_pair_price from the state_pair table, example:
<? Select state_pair_price from state_pair where origin_state=$origin_state AND destination_state=$destination_state;
Next in the same script, I would like to insert the state_pair_price result from above into the field named price in a different table named email_quotes, example:
Insert state_pair_price into email_quotes.price;
?>
Both tables above reside in same database.
Any help would be appreciated.