nyazoom/queries/records/get_and_update.sql

7 lines
156 B
MySQL
Raw Normal View History

2024-11-21 22:08:51 +00:00
UPDATE records
2024-11-20 16:06:07 +00:00
SET downloads = downloads + 1
2024-11-21 22:08:51 +00:00
WHERE
cache_name = ?
AND downloads < max_downloads
AND julianday('now') - julianday(uploaded) > 5;