Closed (outdated)
Project:
Drupal core
Version:
6.x-dev
Component:
node system
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
8 Oct 2008 at 11:19 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
DeeLay commentedComment #2
DeeLay commentedAdded a simple query to node_delete to remove the corresponding entry from the history table.
Comment #3
stewsnoozesubscribe
Comment #4
stewsnoozeSeems fine to me.
Comment #5
Anonymous (not verified) commentedCascading deletes would be a nice thing to have. ;p
Comment #6
berdirThe query needs to be rewritten to use db_delete().
http://drupal.org/node/310081
Comment #7
sharda_ram commentedsubscribe
Comment #8
taz88ny commentedsubscribe
Comment #9
DeeLay commentedThanks berdir, I guess I should also change the existing queries so instead of having:
db_query('DELETE FROM {node} WHERE nid = %d', $node->nid);
db_query('DELETE FROM {node_revision} WHERE nid = %d', $node->nid);
db_query('DELETE FROM {history} WHERE nid = %d', $node->nid);
we would end up with:
db_delete('node')
->condition('nid', $node->nid)
->execute();
db_delete('node_revision')
->condition('nid', $node->nid)
->execute();
db_delete('history')
->condition('nid', $node->nid)
->execute();
Comment #10
DeeLay commentedattached new patch using db_delete
Comment #11
stewsnoozeComment #12
moshe weitzman commentedWith bonus DBTNG cleanup. Thanks.
Comment #13
dries commentedCommitted to CVS HEAD. Thanks.
Comment #14
fgmProbably needs backport to 6.x (5.x ?), since it is a bug, though minor.
Comment #15
fgmSetting version for backport.
Comment #16
albert volkman commentedD6 backport.
Comment #17
thiagomp commentedWorked well on D6. I think it is fine.