Issue #1617006 by ben.kyriakou: Add note to drupal_write_record docs saying not to use in update functions

merge-requests/26/head
Jennifer Hodgdon 2012-07-06 08:26:14 -07:00
parent 43b01fe4c3
commit d6272db16e
1 changed files with 4 additions and 0 deletions

View File

@ -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.