Error message
You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).function UpdateQuery_mysql::__toString
Implements PHP magic __toString method to convert the query to a string.
Return value
string The prepared statement.
Overrides UpdateQuery::__toString
File
-
includes/
database/ mysql/ query.inc, line 105
Class
Code
public function __toString() {
if (method_exists ($this->connection , 'escapeField')) {
if (!is_array ($this->fields )) {
if (version_compare (PHP_VERSION, '7.4', '>=')) {
throw new UnexpectedValueException();
}
else {
drupal_trigger_fatal_error ('Unexpected Value');
}
}
$escapedFields = array();
foreach ($this->fields as $field => $data) {
$field = $this->connection
->escapeField ($field);
$escapedFields[$field] = $data;
}
$this->fields = $escapedFields;
}
return parent ::__toString ();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.