[development] uninstall: deleting all variables of a module

Earnie Boyd earnie at users.sourceforge.net
Sat Apr 18 13:48:55 UTC 2009

Quoting Eric Schaefer <eric.schaefer at eas-consulting.de>:

> Hello List,
> I want to implement the uninstall hook for scheduler.module (D6).
> Removing the schema and configuration variables is pretty straight
> forward. But scheduler lets the user configure some values depending
> on node type. These variables are called 'scheduler_story' or
> 'scheduler_touch_event'. To remove these I would need to know all the
> node types that have ever been used at that site or I could enumerate
> everything in $conf that begins with 'scheduler_'. What is the
> recommened way of doing this. Is is even a good idea to access $conf
> directly?

db_query(DELETE FROM {variable} WHERE name LIKE '%s_%%', 'scheduler');

-- http://r-feed.com/           -- http://for-my-kids.com/
-- http://www.4offer.biz/       -- http://give-me-an-offer.com/

More information about the development mailing list