Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a lot of records without labels, I want to assign a specific tag such records. If the name of the record found a certain word, then it is assigned a specific tag. I think it can be done through SQL-query, but how to realize it is not possible, because the tags and records are in different tables. I would be very grateful for your help. Sorry for my bad English!

share|improve this question
Have you seen this? –  toscho Jun 22 '13 at 15:57
Great idea, but I wanted to change reflected in the database, that is to make SQL-query, but I do not know what. –  Доктор Скальпинг Jun 22 '13 at 18:35
That would be a rather complex SQL query. Not sure what the best approach would be for that. –  toscho Jun 22 '13 at 18:46
Clearly, what other options? –  Доктор Скальпинг Jun 22 '13 at 19:40
I can't why @toscho's answer won't do the job? There's even a code snippet at the bottom to apply to all existing posts. You don't need to manually craft the SQL yourself, let PHP do the work! –  TheDeadMedic Jun 23 '13 at 0:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.