I'm in Drupal 7 and implementing custom script inside Drupal Root folder. Then i'm trying to call-up a node with node_load(1234)
and then node_save($node)
. Between this two methods, i'm trying to DELETE
some records (some DB Rows). But i can not make it work in any way i found.
The scenario is like:
$node = node_load($nid);
..
.. Step 1. Some node updates like: $node->title = "New Title!";
.. Step 2. Some row DELETIONS
..
node_save($node);
Then Step 2.
is NOT WORKING.
Step 2.
may include Row Deletion Methods like:
$deleted_row = db_delete('some_table')
->condition('nid', $nid)
->execute();
[or]
db_query("DELETE FROM {some_table} WHERE nid = %d", $nid);
So my questions are:
- Is Drupal
node_load
locking the loadednode
and all its related fields (rows) before it release back bynode_save
? - Is there any possible way to DELETE a Simple DB Row (after
node_load
is called) ?
Any suggestion please.
No one answered. But i found it by myself that the answer is "no, it doesn't lock".