Skip to content

Commit

Permalink
Saves null value to DB as null (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindb authored and arrilot committed Apr 4, 2019
1 parent 7e002aa commit dd9e111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/SqlDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getRows($table, $columns, $where)
public function updateByPrimary($table, $primaryKeyValue, $column, $value)
{
$where = $this->buildWhereForArray($primaryKeyValue);
$quotedValue = $value === null ? $value : $this->pdo->quote($value);
$quotedValue = $value === null ? 'null' : $this->pdo->quote($value);

$sql = "UPDATE
{$table}
Expand Down

0 comments on commit dd9e111

Please sign in to comment.