Does Drupal node_load lock the Node and Related Fields?

290 views Asked by At

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 loaded node and all its related fields (rows) before it release back by node_save ?
  • Is there any possible way to DELETE a Simple DB Row (after node_load is called) ?

Any suggestion please.

1

There are 1 answers

0
夏期劇場 On BEST ANSWER

No one answered. But i found it by myself that the answer is "no, it doesn't lock".