X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/b43967e75a9a02e61a8ac2263f3b5432556d661f..c30bd94928988ff03ade10ca872968681456e12c:/WEB-INF/lib/ttProjectHelper.class.php diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index 2a439dd9..98d928f9 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -206,12 +206,8 @@ class ttProjectHelper { $affected = $mdb2->exec($sql); 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_projects', 'id'); // Bind the project to users. $active_users = ttTeamHelper::getActiveUsers(array('getAllFields'=>true));