nyazoom/queries/records/get_and_update.sql

7 lines
156 B
MySQL
Raw Normal View History

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