6 lines
156 B
SQL
6 lines
156 B
SQL
UPDATE records
|
|
SET downloads = downloads + 1
|
|
WHERE
|
|
cache_name = ?
|
|
AND downloads < max_downloads
|
|
AND julianday('now') - julianday(uploaded) > 5;
|