Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThilina Buddika <thilinaabeyrathna@gmail.com>2012-05-18 07:33:00 +0400
committerThilina Buddika <thilinaabeyrathna@gmail.com>2012-05-18 07:33:00 +0400
commit019ff12437b9d3c844afa2ae27dc5cf0605a9993 (patch)
tree078103c8ee41e1443c3be15de9c16438ba8bfb67 /tbl_replace.php
parenta421aef07ff55dd0fb23f61f69f31af869454f16 (diff)
bug fixing in tbl_change and new functionn for tbl_replace
Diffstat (limited to 'tbl_replace.php')
-rw-r--r--tbl_replace.php24
1 files changed, 6 insertions, 18 deletions
diff --git a/tbl_replace.php b/tbl_replace.php
index f7e0f9e263..6c2ff58998 100644
--- a/tbl_replace.php
+++ b/tbl_replace.php
@@ -16,6 +16,11 @@
*/
require_once 'libraries/common.inc.php';
+/**
+ * functions implementation for this script
+ */
+require_once 'libraries/insert_edit.lib.php';
+
// Check parameters
PMA_checkParameters(array('db', 'table', 'goto'));
@@ -102,24 +107,7 @@ if (isset($_REQUEST['err_url'])) {
/**
* Prepares the update/insert of a row
*/
-if (isset($_REQUEST['where_clause'])) {
- // we were editing something => use the WHERE clause
- $loop_array = (is_array($_REQUEST['where_clause']) ? $_REQUEST['where_clause'] : array($_REQUEST['where_clause']));
- $using_key = true;
- $is_insert = $_REQUEST['submit_type'] == 'insert'
- || $_REQUEST['submit_type'] == 'showinsert'
- || $_REQUEST['submit_type'] == 'insertignore';
- $is_insertignore = $_REQUEST['submit_type'] == 'insertignore';
-} else {
- // new row => use indexes
- $loop_array = array();
- foreach ($_REQUEST['fields']['multi_edit'] as $key => $dummy) {
- $loop_array[] = $key;
- }
- $using_key = false;
- $is_insert = true;
- $is_insertignore = false;
-}
+list($loop_array, $using_key, $is_insert, $is_insertignore) = PMA_getParamsForUpdateOrInsert();
$query = array();
$value_sets = array();