By fiasst-1 on
Hi, I'm trying to update a CCK fields value from my node.tpl.
The value updates in the database but it seems Drupal is reading from a cached value somewhere?
Here's my query. What am I missing?
db_query("UPDATE {content_type_photo} SET field_CCKnumber_value = 10 WHERE nid = 1");
(I've hardcoded numbers 10 and 1 to test this code but they will eventually be passed in dynamically.)
Many thanks
Comments
In node.tpl.php? Probably the
In node.tpl.php? Probably the template variable which you are printing ($content or whatever) has already taken its value.
cache_content? Try
cache_content?
Try using;
cache_clear_all('content:1:1', 'cache_content');I think the 1:1 is nid:vid?
Pobster
FANTASTIC!
thanks :]