I have a php script that processes keywords from the mysql "keywords" table (columns: id - keyword) and then saves the data to another data table (column: id [foreign key keywords.id] - dataname - datavalue) .
My problem is that when the script is ready to save data, I only have a keyword, not an identifier.
So, is there a way to get the keyword id and save the data in a single mysql query? (I mean, without having to do something like SELECT id from keywords, where keyword = keyword, then run another query for INSERT.
source
share