Is it possible to do the following with开发者_JS百科 a single MySql Query.
INPUT: a list of several words to processed
I have a dictionary in table 2 and each word in it has an id. If an inputted word is in the dictionary, its dictionary id should be added to table 2 as a row. If not the word itself should be added to table 3.
OUTPUT: All the values that were added to table 3
Maybe not with a single MySQL query, but you might be able to hack it together using a Trigger.
http://dev.mysql.com/doc/refman/5.0/en/triggers.html
精彩评论