I am trying to update rows in a database (a wordpress e-commerce installation) so that all rows in which the stock row with the with the same id is 0, are set to 'outofstock' currently I get the error 'SQL Error 1064'
UPDATE `squirrel`.`wp_postmeta`
SET LEFT(`meta_value`, 256) = 'outofstock'
WHERE `post_id` IN (SELECT `post_id` FROM `squirrel`.`wp_postmeta` WHERE
`meta_key` = '_stock'
AND LEFT(`meta_value`, 256) = 0) AND `meta_key` = '_stock_status';
What is wrong with my code?