Update database.php
This commit is contained in:
@@ -711,6 +711,7 @@ include "root.php";
|
|||||||
//exit;
|
//exit;
|
||||||
|
|
||||||
//get the current data
|
//get the current data
|
||||||
|
if (is_array($delete_array)) {
|
||||||
foreach($delete_array as $table_name => $rows) {
|
foreach($delete_array as $table_name => $rows) {
|
||||||
foreach($rows as $row) {
|
foreach($rows as $row) {
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@@ -730,6 +731,7 @@ include "root.php";
|
|||||||
unset($parameters);
|
unset($parameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//save the array
|
//save the array
|
||||||
$old_array = &$array;
|
$old_array = &$array;
|
||||||
@@ -738,6 +740,7 @@ include "root.php";
|
|||||||
$this->db->beginTransaction();
|
$this->db->beginTransaction();
|
||||||
|
|
||||||
//delete the current data
|
//delete the current data
|
||||||
|
if (is_array($delete_array)) {
|
||||||
foreach($delete_array as $table_name => $rows) {
|
foreach($delete_array as $table_name => $rows) {
|
||||||
//echo "table: ".$table_name."\n";
|
//echo "table: ".$table_name."\n";
|
||||||
foreach($rows as $row) {
|
foreach($rows as $row) {
|
||||||
@@ -777,7 +780,6 @@ include "root.php";
|
|||||||
if ($this->debug["sql"]) {
|
if ($this->debug["sql"]) {
|
||||||
$message["details"][$m]["sql"] = $sql;
|
$message["details"][$m]["sql"] = $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->message = $message;
|
$this->message = $message;
|
||||||
$m++;
|
$m++;
|
||||||
}
|
}
|
||||||
@@ -785,6 +787,7 @@ include "root.php";
|
|||||||
} //if permission
|
} //if permission
|
||||||
} //foreach rows
|
} //foreach rows
|
||||||
} //foreach $array
|
} //foreach $array
|
||||||
|
}
|
||||||
|
|
||||||
//commit the atomic transaction
|
//commit the atomic transaction
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|||||||
Reference in New Issue
Block a user