X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/b1082e6ec27ca11586bd786b65f509d1a20220f6..cbc2ae6c2e83edfe7b4242b7dd2f9bfb1359820e:/WEB-INF/lib/ttClientHelper.class.php diff --git a/WEB-INF/lib/ttClientHelper.class.php b/WEB-INF/lib/ttClientHelper.class.php index 24d00d23..3dc60bdb 100644 --- a/WEB-INF/lib/ttClientHelper.class.php +++ b/WEB-INF/lib/ttClientHelper.class.php @@ -189,12 +189,7 @@ class ttClientHelper { if (is_a($affected, 'PEAR_Error')) return false; - $last_id = 0; - $sql = "select last_insert_id() as last_insert_id"; - $res = $mdb2->query($sql); - $val = $res->fetchRow(); - $last_id = $val['last_insert_id']; - + $last_id = $mdb2->lastInsertID('tt_clients', 'id'); if (count($projects) > 0) foreach ($projects as $p_id) { $sql = "insert into tt_client_project_binds (client_id, project_id, group_id, org_id) values($last_id, $p_id, $group_id, $org_id)";