summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJennifer Hodgdon <yahgrp@poplarware.com>2012-07-06 08:26:14 -0700
committerJennifer Hodgdon <yahgrp@poplarware.com>2012-07-06 08:26:14 -0700
commitd6272db16eb2d2b11fd1901c4068170377d2d562 (patch)
tree600b390bf14d01d45d144d09421bd82b3a52ef3b
parent43b01fe4c3fd23ea73de88702b4c0aa118e84dcb (diff)
downloadbrdo-d6272db16eb2d2b11fd1901c4068170377d2d562.tar.gz
brdo-d6272db16eb2d2b11fd1901c4068170377d2d562.tar.bz2
Issue #1617006 by ben.kyriakou: Add note to drupal_write_record docs saying not to use in update functions
-rw-r--r--includes/common.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc
index c684d4167..50f20e685 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -6899,6 +6899,10 @@ function drupal_schema_fields_sql($table, $prefix = NULL) {
/**
* Saves (inserts or updates) a record to the database based upon the schema.
*
+ * Do not use drupal_write_record() within hook_update_N() functions, since the
+ * database schema cannot be relied upon when a user is running a series of
+ * updates. Instead, use db_insert() or db_update() to save the record.
+ *
* @param $table
* The name of the table; this must be defined by a hook_schema()
* implementation.