X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/f613bf4ab8b4c818c9381d4e5e1af5fe5d0a6052..035970e91c0a4c132874656b8f13a88c46684717:/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)";