Bolt\Legacy\Storage::getLatestId PHP Method

getLatestId() public method

public getLatestId ( $contenttypeslug )
    public function getLatestId($contenttypeslug)
    {
        $tablename = $this->getContenttypeTablename($contenttypeslug);
        // Get the current values from the DB.
        $query = sprintf("SELECT id FROM %s ORDER BY datecreated DESC LIMIT 1;", $tablename);
        $id = $this->app['db']->executeQuery($query)->fetch();
        if (!empty($id['id'])) {
            return $id['id'];
        } else {
            return false;
        }
    }