if (recursive)
sql = sqlite3_mprintf("UPDATE '%q' SET validity=%d WHERE (storage_type = 0 OR storage_type = 1) AND path LIKE '%q/%%';", storage_id, validity, path);
else
- sql = sqlite3_mprintf("UPDATE '%q' SET validity=%d WHERE folder_uuid IN (SELECT folder_uuid FROM folder WHERE path='%q' AND storage_uuid='%q');", storage_id, validity, path, storage_id);
+ sql = sqlite3_mprintf("UPDATE '%q' SET validity=%d WHERE folder_id IN (SELECT folder_id FROM folder WHERE folder_path='%q' AND storage_uuid='%q');", storage_id, validity, path, storage_id);
ret = media_db_request_update_db(sql, uid);
MS_SQLITE3_SAFE_FREE(sql);
MS_DBG_RETVM_IF(storage_id == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
MS_DBG_RETVM_IF(path == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
- sql = sqlite3_mprintf("SELECT folder_uuid FROM folder WHERE (storage_uuid='%q' AND folder_path='%q')", storage_id, path);
+ sql = sqlite3_mprintf("SELECT folder_id FROM folder WHERE (storage_uuid='%q' AND folder_path='%q')", storage_id, path);
ret = media_db_get_result(handle, sql, &sql_stmt);
MS_DBG_RETV_IF(ret != MS_MEDIA_ERR_NONE, ret);