summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/Pref_Filters.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/classes/Pref_Filters.php b/classes/Pref_Filters.php
index a6063d898..40fc99600 100644
--- a/classes/Pref_Filters.php
+++ b/classes/Pref_Filters.php
@@ -689,14 +689,10 @@ class Pref_Filters extends Handler_Protected {
$sth = $this->pdo->prepare("INSERT INTO ttrss_filters2
(owner_uid, match_any_rule, enabled, title, inverse) VALUES
- (?, ?, ?, ?, ?)");
+ (?, ?, ?, ?, ?) RETURNING id");
$sth->execute([$_SESSION['uid'], $match_any_rule, $enabled, $title, $inverse]);
- $sth = $this->pdo->prepare("SELECT MAX(id) AS id FROM ttrss_filters2
- WHERE owner_uid = ?");
- $sth->execute([$_SESSION['uid']]);
-
if ($row = $sth->fetch()) {
$filter_id = $row['id'];