diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-04 19:20:39 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-04 19:20:39 +0000 |
commit | 15445a6db97dfe63a2a1739deef9bb900068ff86 (patch) | |
tree | 2a821cf82bbfcf22c7e6724716d4dce2a1fb64d4 | |
parent | 560bd06f3b78f8ecd49a2b66acce06cb627d9027 (diff) | |
download | brdo-15445a6db97dfe63a2a1739deef9bb900068ff86.tar.gz brdo-15445a6db97dfe63a2a1739deef9bb900068ff86.tar.bz2 |
#180877 by Arancaytar: drupal_write_record() was not prefixing tables properly because PHP string parsing behavior
-rw-r--r-- | includes/common.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc index 0ad9d2428..5baafa8b3 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3098,7 +3098,7 @@ function drupal_write_record($table, &$object, $update = array()) { // Build the SQL. $query = ''; if (!count($update)) { - $query = "INSERT INTO {$table} (" . implode(', ', $fields) . ') VALUES (' . implode(', ', $placeholders) . ')'; + $query = "INSERT INTO {". $table ."} (" . implode(', ', $fields) . ') VALUES (' . implode(', ', $placeholders) . ')'; $return = SAVED_NEW; } else { @@ -3115,7 +3115,7 @@ function drupal_write_record($table, &$object, $update = array()) { $values[] = $object->$key; } - $query = "UPDATE {$table} SET $query WHERE ". implode(' AND ', $conditions); + $query = "UPDATE {". $table ."} SET $query WHERE ". implode(' AND ', $conditions); $return = SAVED_UPDATED; } db_query($query, $values); |