diff options
author | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-10-23 13:33:45 +0300 |
---|---|---|
committer | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-10-23 13:33:45 +0300 |
commit | d2b53cccbbbbb6aa126f7b011864a517aef72276 (patch) | |
tree | 1effc629ce292e737f190dde7470081f7d6d6bdd | |
parent | 0cac8169b23857b79f9a9d3a47107eadb309c83b (diff) | |
download | connector-php-d2b53cccbbbbb6aa126f7b011864a517aef72276.zip connector-php-d2b53cccbbbbb6aa126f7b011864a517aef72276.tar.gz connector-php-d2b53cccbbbbb6aa126f7b011864a517aef72276.tar.bz2 |
[fix] incorrect max order settings in case of MySQL
-rw-r--r-- | codebase/db_common.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/codebase/db_common.php b/codebase/db_common.php index 76ac179..4fe5f77 100644 --- a/codebase/db_common.php +++ b/codebase/db_common.php @@ -656,10 +656,10 @@ abstract class DBDataWrapper extends DataWrapper{ $id = $this->config->id["db_name"]; $idvalue = $action->get_new_id(); - $max = $this->queryOne("SELECT MAX($order) as maxvalue FROM $table"); - $maxvalue = $max["maxvalue"] + 1; + $max = $this->queryOne("SELECT MAX($order) as dhx_maxvalue FROM $table"); + $dhx_maxvalue = $max["dhx_maxvalue"] + 1; - $this->query("UPDATE $table SET $order = $maxvalue WHERE $id = $idvalue"); + $this->query("UPDATE $table SET $order = $dhx_maxvalue WHERE $id = $idvalue"); } } |