git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13204
7612ce4b-ef26-0410-bec9-
ea0150e637f0
+ $db_field = $this->get_field_name($field);
+ if ($db_field == 'ERROR') {
+ return $this->set_error(sprintf(_("Unknown field name: %s"), $field));
+ }
+
$query = sprintf("SELECT * FROM %s WHERE owner = '%s' AND LOWER(%s) = '%s'",
$query = sprintf("SELECT * FROM %s WHERE owner = '%s' AND LOWER(%s) = '%s'",
- $this->table, $this->owner, $this->get_field_name($field),
+ $this->table, $this->owner, $db_field,
$this->dbh->quoteString($value));
$res = $this->dbh->query($query);
$this->dbh->quoteString($value));
$res = $this->dbh->query($query);