I have this mysql query:
UPDATE `table`.`wp_12_postmeta`
SET `meta_value` = 'yyy'
WHERE `wp_12_postmeta`.`meta_id` =5
LIMIT 1 ;
How do i incorporate this:
- instead of
wp_12_
i want a variable$prefix
(variable holds wp_4_, wp_3_, etc) - instead of
yyy
i want a value$perf
(variable is a name ) - instead of
5
i want a value$meta_id
(variable is a nr)
Thank u!
P.S.
here is what i use and it works:
$wpdb->query("UPDATE ".$prefix."postmeta SET meta_value = '".$perf."' WHERE meta_id = '".$meta_id."' LIMIT 1 ");
Problem is, when i execute this query, severl post meta fields are updated, instead of just one. Ty