Тип письма. Экранирование ковычек в запросе
This commit is contained in:
parent
5dac5a6e19
commit
e2f5ecdbca
2 changed files with 9 additions and 3 deletions
|
|
@ -72,7 +72,7 @@ class Database extends PDO
|
|||
return $sth->fetch();
|
||||
}
|
||||
|
||||
private static function assignQuote($x, $y)
|
||||
private function assignQuote($x, $y)
|
||||
{
|
||||
return $x . "=" . $this->quote($y);
|
||||
}
|
||||
|
|
@ -92,7 +92,7 @@ class Database extends PDO
|
|||
function updateQuery($table, array $values, $cond)
|
||||
{
|
||||
return $this->query("UPDATE $table SET " . implode(",",
|
||||
array_map(array('self', 'assignQuote'), array_keys($values), array_values($values))) . " WHERE $cond");
|
||||
array_map(array($this, 'assignQuote'), array_keys($values), array_values($values))) . " WHERE $cond");
|
||||
}
|
||||
|
||||
function getIdGenerator() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue