Strict Standards: Declaration of action_plugin_dlcount::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/dlcount/action.php on line 14

Strict Standards: Declaration of action_plugin_indexmenu::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/indexmenu/action.php on line 169

Strict Standards: Declaration of action_plugin_ipban::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/ipban/action.php on line 67

Strict Standards: Declaration of action_plugin_loglog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/loglog/action.php on line 82

Strict Standards: Declaration of action_plugin_navi::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/navi/action.php on line 46

Strict Standards: Declaration of action_plugin_uparrow::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/uparrow/action.php on line 69

Strict Standards: Declaration of action_plugin_userspagecreate::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/userspagecreate/action.php on line 97

Strict Standards: Declaration of cache_instructions::retrieveCache() should be compatible with cache::retrieveCache($clean = true) in /home/www/wiki/inc/cache.php on line 289

Warning: Cannot modify header information - headers already sent by (output started at /home/www/wiki/lib/plugins/dlcount/action.php:14) in /home/www/wiki/inc/auth.php on line 312

Strict Standards: Only variables should be passed by reference in /home/www/wiki/doku.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at /home/www/wiki/lib/plugins/dlcount/action.php:14) in /home/www/wiki/inc/actions.php on line 154
sql commands [phpwcms-HowTo:wiki]

Strict Standards: Declaration of syntax_plugin_code::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, &$renderer, $data) in /home/www/wiki/lib/plugins/code/syntax.php on line 41

Strict Standards: Declaration of syntax_plugin_tip::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, &$renderer, $data) in /home/www/wiki/lib/plugins/tip/syntax.php on line 38

sql commands

Tool: phpMyAdmin

gain ownership of all of 'em!

Imagine some people who did upload a bunch of files each. What a PITA to sort this mess - well, not really, because it is plain impossible to do so.
But there is help - read the following and get instant relief:

UPDATE TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, 'find this', 'replace with that');

This will translate into (where “2” is the “f_uid” of the second admin e.g. and you yourself are the number “1”)

UPDATE phpwcms_file SET f_uid=REPLACE(f_uid, '2', '1');


Example 1:
All files and folders with an ID > 51.

UPDATE phpwcms_file SET f_uid = REPLACE( f_uid, '2', '1' ) WHERE f_id >51;


Example 2:
All files and folders within the directory with the ID = 66.

UPDATE phpwcms_file SET f_uid = REPLACE( f_uid, '2', '1' ) WHERE f_pid =66;

But this is still a placeholder! Imagine, which wonderful (and terrible) things you can do with that command!
And the result of the above? The folder of the second admin is plain empty and you are the winner 8-)

deleting some dirt

(SQL commands)

Diving right into it we plainly execute the following:

DELETE FROM phpwcms_file WHERE f_trash=8;

For deleted files/pictures (only after you have cleared the trash can in filemanager and doing Admin → remove deleted files!!!

english/technics/database/phpwcms_file/sql-commands.txt · Last modified: 2010/04/14 16:59 by Knut Heermann (flip-flop)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0

Strict Standards: Only variables should be passed by reference in /home/www/wiki/doku.php on line 79