PostgreSQL: Quote table name in manually formed query - fixes profile settings update
darcs-hash:20080915070256-f6e2c-344d1ca1ca158b9ab5f558804ad129c1ef9d6a7a.gz
This commit is contained in:
parent
3632a76773
commit
ab68c61a12
@ -101,7 +101,12 @@ class User extends DB_DataObject
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$toupdate = implode(', ', $parts);
|
$toupdate = implode(', ', $parts);
|
||||||
$qry = 'UPDATE ' . $this->tableName() . ' SET ' . $toupdate .
|
|
||||||
|
$table = $this->tableName();
|
||||||
|
if(common_config('db','quote_identifiers')) {
|
||||||
|
$table = '"' . $table . '"';
|
||||||
|
}
|
||||||
|
$qry = 'UPDATE ' . $table . ' SET ' . $toupdate .
|
||||||
' WHERE id = ' . $this->id;
|
' WHERE id = ' . $this->id;
|
||||||
return $this->query($qry);
|
return $this->query($qry);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user