Loading...
 
Skip to main content

Upgrade to Tiki4: You can't specify target table 'tiki_file_galleries' for update in FROM clause

Status
Closed
Subject
Upgrade to Tiki4: You can't specify target table 'tiki_file_galleries' for update in FROM clause
Version
4.x
5.x
Category
  • Error
Feature
File Gallery (elFinder or standard UI)
Resolution status
Invalid
Submitted by
Marc Laporte
Lastmod by
Ushindi Gedeon
Rating
(0)
Description
Copy to clipboard
UPDATE `tiki_file_galleries` SET `parentId` = (SELECT * FROM (SELECT `galleryId` FROM `tiki_file_galleries` WHERE `type` = 'system') AS t) WHERE `parentId` = -1 AND `type` != 'system' You can't specify target table 'tiki_file_galleries' for update in FROM clause



Suggestion: use php for this, and rely less on sql

happened on MySQL 4.1.22-standard

Solution
Workaround
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
3000
Created
Thursday 21 January, 2010 21:55:32 UTC
by Marc Laporte
LastModif
Monday 01 June, 2026 18:01:40 UTC


Show PHP error messages