nyazoom/queries/records/get_and_update.sql

7 lines
156 B
MySQL
Raw Permalink 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
2024-11-22 00:25:29 +00:00
AND julianday('now') - julianday(uploaded) < 5;