Back to PhocaDownloadDownload class

Method hitToken

protected static
hitToken
(mixed $id)

Method hitToken - Source code

protected static function hitToken($id)
{
    $db = Factory::getDBO();
    $query = $db->getQuery(true)->update('#__phocadownload')->set($db->quoteName('tokenhits') . ' = (' . $db->quoteName('tokenhits') . ' + 1)')->where('id = ' . $db->quote((int) $id));
    $db->setQuery($query);
    $db->execute();
    return true;
}