<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div style="RIGHT: auto"><SPAN style="RIGHT: auto">It is not uncommon to just delete them straight from the database table using "mymodule_%". Just make sure you are the only one using that namespace.<VAR id=yui-ie-cursor></VAR><BR style="RIGHT: auto" class=yui-cursor></SPAN></div>
<DIV></DIV>
<DIV style="RIGHT: auto">&nbsp;</DIV>
<div style="RIGHT: auto"><FONT color=#ff007f size=4 face="bookman old style, new york, times, serif"><I><STRONG>Nancy</STRONG></I></FONT></div>
<div style="RIGHT: auto">&nbsp;</div>
<div><FONT face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</FONT></div>
<div style="RIGHT: auto"><BR>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; RIGHT: auto">
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12pt"><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr readonly="true" contenteditable="false"></DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Peter Anderson</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"></FONT><FONT style="RIGHT: auto" face=sans-serif></FONT>&nbsp;</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT style="RIGHT: auto" face=sans-serif>I have a module that uses quite a few variables</FONT> and would like to remove them in my hook_uninstall() function, but I don't want to have to list them all manually...<BR><BR>I see three ways to do this:<BR>1 - Run variable_del() for each variable manually<BR>2 - List all variables then remove the ones that start with my module's name<BR>3 - Delete variables directly from the database that start with my module's name<BR><BR>I'm obviously trying to avoid #1.<BR>I've used #2 before (http://drupalbin.com/18718) but am worried about the possible performance implications of running a foreach() on every variable in Drupal... Is this good or not?<BR>I'd prefer not to resort to using SQL to delete variables from the database directly as in #3, but this may be the only recommended
 option...</DIV></DIV></BLOCKQUOTE></div></div></body></html>