ON Conflict for postgres

This commit is contained in:
2020-06-18 15:08:09 +02:00
parent 94eb70c24e
commit 63fcba9dd9
4 changed files with 46 additions and 15 deletions

View File

@@ -143,7 +143,7 @@ abstract class SQL {
$returningCol = $insert->getReturning();
$returning = $this->getReturning($returningCol);
$query = "INSERT INTO $tableName$columnStr VALUES$values$onDuplicateKey$returning";
$query = "INSERT INTO $tableName$columnStr VALUES $values$onDuplicateKey$returning";
if($insert->dump) { var_dump($query); var_dump($parameters); }
$res = $this->execute($query, $parameters, !empty($returning));
$success = ($res !== FALSE);