marked = false AND
feed_id = ? AND
$query_limit
- ttrss_entries.date_updated < NOW() - INTERVAL ?");
- $sth->execute([$feed_id, "$purge_interval days"]);
+ ttrss_entries.date_updated < NOW() - INTERVAL ? days");
+ $sth->execute([$feed_id, $purge_interval]);
} else {
$sth = $pdo->prepare("DELETE FROM ttrss_user_entries
if (get_schema_version() < 63) $profile_qpart = "";
- ////db_query("BEGIN");
-
$pdo = DB::pdo();
+ $pdo->beginTransaction();
+
$sth = $pdo->query("SELECT pref_name,def_value FROM ttrss_prefs");
$profile = $profile ? $profile : null;
}
}
- ////db_query("COMMIT");
+ $pdo->commit();
}
if (!$feed_cat) return false;
- ////db_query("BEGIN");
-
$feed_cat = mb_substr($feed_cat, 0, 250);
$pdo = Db::pdo();
+ $pdo->beginTransaction();
$sth = $pdo->prepare("SELECT id FROM ttrss_feed_categories
WHERE (:parent IS NULL AND parent_cat IS NULL OR parent_cat = :parent)
VALUES (?, ?, ?)");
$sth->execute([$_SESSION['uid'], $feed_cat, $parent_cat_id]);
- //db_query("COMMIT");
+ $pdo->commit();
return true;
}
+ $pdo->commit();
+
return false;
}