nyazoom/queries/records/get_and_update.sql
2024-11-21 14:08:51 -08:00

6 lines
156 B
SQL

UPDATE records
SET downloads = downloads + 1
WHERE
cache_name = ?
AND downloads < max_downloads
AND julianday('now') - julianday(uploaded) > 5;