1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-14 18:44:02 +02:00

PostgreSQL: Limit rows in data manipulation without unique key

This commit is contained in:
Jakub Vrana
2018-02-01 16:56:50 +01:00
parent 763e66a148
commit 52d98e16fa
9 changed files with 15 additions and 13 deletions

View File

@@ -50,7 +50,7 @@
*/
function delete($table, $queryWhere, $limit = 0) {
$query = "FROM " . table($table);
return queries("DELETE" . ($limit ? limit1($query, $queryWhere) : " $query$queryWhere"));
return queries("DELETE" . ($limit ? limit1($table, $query, $queryWhere) : " $query$queryWhere"));
}
/** Update data in table
@@ -67,7 +67,7 @@
$values[] = "$key = $val";
}
$query = table($table) . " SET$separator" . implode(",$separator", $values);
return queries("UPDATE" . ($limit ? limit1($query, $queryWhere) : " $query$queryWhere"));
return queries("UPDATE" . ($limit ? limit1($table, $query, $queryWhere) : " $query$queryWhere"));
}
/** Insert data into table