I have two custom fields, and both have numeric values:
tnid_01
tnid_01old
Custom Field 'tnid_01' exists for all posts.
Custom Field 'tnid_01old' only exists for some posts.
I am trying to replace the value of 'tnid_01' with the value of 'tnid_01old', but only if 'tnid_01old' exists.
This is what i have so far, but i get a mysql error:
Update wp_postmeta (post_id, meta_key, meta_value)(
SELECT post_id, 'tnid_01', meta_value
FROM wp_postmeta
WHERE meta_key='tnid_01old'
);
thx