Jump to content

Problem with update query


SyncViews

Recommended Posts

I don't see why this shouldn't work...

UPDATE forums
SET topics=topics+1, posts=posts+1,
last_topic_name='Test topic...', last_topic_id=14,
last_post_id=19, last_post_time=1209662581,
last_user_id=1, last_user_name='SyncViews'
WHERE forum_id IN
(
SELECT parent.forum_id
FROM forums AS forum, forums AS parent
WHERE forum.left BETWEEN parent.left AND parent.right
AND forum.forum_id = 5
)

#1093 - You can't specify target table 'forums' for update in FROM clause

Link to comment
https://forums.phpfreaks.com/topic/103834-problem-with-update-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.