This query works fine. I now want to add another "rule" to it. The rule I want to add is to update tran_term_taxonomy
.description
with only non-duplicate records. Explained slightly differently, if an earlier record in tran_term_taxonomy
.description
contains the string "the cat crossed the road", then do not add "the cat crossed the road" again during the subsequent update process. How do I do this? Thanks.
UPDATE `tran_term_taxonomy` SET `description` = (SELECT keyword from `good_keywords` ORDER BY RAND() LIMIT 1,1) WHERE `tran_term_taxonomy`.`taxonomy` = 'post_tag' AND `tran_term_taxonomy`.`description` = '' LIMIT 1