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.
query from one table and insert result into another table
Moderator: General Moderators
query from one table and insert result into another table
Last edited by ktell on Fri Nov 29, 2002 1:32 am, edited 1 time in total.
you don't have to store the values locally, mysql can handle that internally (if you like
)
http://www.mysql.com/doc/en/INSERT_SELECT.html
http://www.mysql.com/doc/en/INSERT_SELECT.html