Created
March 21, 2012 16:05
-
-
Save timonweb/2149035 to your computer and use it in GitHub Desktop.
Deletes url aliases from a desired content type in Drupal 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$result = db_query("SELECT nid FROM {node} WHERE type='publicprofile'"); | |
while ($data = db_fetch_object($result)) { | |
db_query("DELETE FROM {url_alias} WHERE src LIKE '%s'", 'node/' . $data->nid); | |
drupal_set_message('Deleted alias for a node %nid', array('%nid' => $data->nid)); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment