Restrict caches not found to available caches

sql-rework
Tomasz Golinski 2019-10-06 13:08:37 +02:00
rodzic e6774720a1
commit 0f15dcb82c
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -286,7 +286,7 @@ Caches OCdb::get_user_caches_not_found(std::string uuid) {
Caches cc;
Cache c;
std::string sql = "SELECT code, location FROM caches WHERE NOT EXISTS (SELECT cache_code FROM logs WHERE cache_code = code AND type = 'Found it' and user = ?);";
std::string sql = "SELECT code, location FROM caches WHERE status = 'Available' AND NOT EXISTS (SELECT cache_code FROM logs WHERE cache_code = code AND type = 'Found it' and user = ?);";
res = sqlite3_prepare_v2(db, sql.c_str(), sql.length() + 1, &stmt, NULL);
if (res != SQLITE_OK) {