many thanks to everyone<br><br><div class="gmail_quote">On Thu, Mar 12, 2009 at 9:07 PM, Brett Evanson <span dir="ltr"><<a href="mailto:brettev@gmail.com">brettev@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
if you want to delete the content first, modify code like this:<br>
<div class="im"><br>
> $drupal_sql = 'select users.uid from {users} left join {users_roles} on<br>
> users.uid = users_roles.uid<br>
> where rid=4 '; // where 4 is your role<br>
> $r = db_query($drupal_sql);<br>
> while ($row = db_fetch_array($r)) {<br>
</div> $usersnodes = db_query("SELECT nid FROM {node} WHERE uid=%d", $row->uid);<br>
while($usernode = db_fetch_object($usersnodes)){<br>
node_delete($usernode->nid);<br>
<div class="im"> }<br>
> user_delete($row->uid);<br>
> }<br>
><br>
> Sumthin' like that.<br>
</div><div class="im">> --<br>
> [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
><br>
<br>
</div>pretty rough, but i think it'll work<br>
<font color="#888888"><br>
--<br>
Brett Evanson<br>
<a href="mailto:brettev@gmail.com">brettev@gmail.com</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>-- <br>--<br>Steve Power<br>Principal Consultant<br>Mobile: +44 (0) 7747 027 243<br>Initsix Technology and Media<br>--<br>"So Linux is bulletproof? No. Bulletproof is one of the last stages of drunkenness, not a state of security" <a href="http://www.linux.com/feature/60208">http://www.linux.com/feature/60208</a><br>