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

Abstract UPDATE

This commit is contained in:
Jakub Vrana
2013-07-05 15:32:15 -07:00
parent 1f7fa44923
commit b7739dc0bd
3 changed files with 32 additions and 16 deletions

View File

@@ -41,11 +41,10 @@ if ($_POST && !$error && !isset($_GET["select"])) {
if (!$set) {
redirect($location);
}
$query = table($TABLE) . " SET" . implode(",", $set);
query_redirect(
"UPDATE" . ($unique_array ? " $query$query_where" : limit1($query, $query_where)),
queries_redirect(
$location,
lang('Item has been updated.')
lang('Item has been updated.'),
$driver->update($TABLE, $set, $query_where, !$unique_array)
);
if (is_ajax()) {
page_headers();