How can I SELECT+INSERT in the same mysql query?

Disable

New Member
I have a php script that process keywords from a mysql table "keywords" (columns: id - keyword) and then it saves data into another table "data" (column: id[foreign key keywords.id] - dataname - datavalue).My problem is that when the script is ready to save the data I only have the keyword and not the id.So is there a way I can get the keyword id and save the data in one mysql query? (i mean without having to do something like SELECT id from keywords where keyword = keyword, and then run another query for the INSERT.
 
Back
Top