X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/cbc2ae6c2e83edfe7b4242b7dd2f9bfb1359820e..b43967e75a9a02e61a8ac2263f3b5432556d661f:/WEB-INF/lib/ttFavReportHelper.class.php?ds=sidebyside diff --git a/WEB-INF/lib/ttFavReportHelper.class.php b/WEB-INF/lib/ttFavReportHelper.class.php index f1943f71..36600e21 100644 --- a/WEB-INF/lib/ttFavReportHelper.class.php +++ b/WEB-INF/lib/ttFavReportHelper.class.php @@ -107,13 +107,8 @@ class ttFavReportHelper { if (is_a($affected, 'PEAR_Error')) return false; - $sql = "select last_insert_id() as last_id"; - $res = $mdb2->query($sql); - if (is_a($res, 'PEAR_Error')) - return false; - - $val = $res->fetchRow(); - return $val['last_id']; + $last_id = $mdb2->lastInsertID('tt_fav_reports', 'id'); + return $last_id; } // updateReport - updates report options in the database.