I'm trying to learn MySQL queries for use with Wordpress....
What I do know is this query, which gives all instances of the custom field "description" the value of "test" if the field is NULL
UPDATE `wp_postmeta` SET `meta_value` = 'test' WHERE `meta_key` LIKE 'description' and `meta_value` is null
What I need to do is change that so I can write to a category; categories are stored in wp_term, like this: WHERE term_id = '3'
But, this throws a syntax error:
UPDATE `wp_postmeta` SET `meta_value` = 'test' WHERE `meta_key` LIKE 'description' and `meta_value` is null WHERE term_id = '3'
So I'm doing something wrong; I'm thinking the syntax that is involved with categories is much more complex than tagging in another "WHERE".