diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-05-06 05:06:17 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-05-06 05:06:17 +0300 |
| commit | 77e5deb9dda0e718227390993346994cf6cc1737 (patch) | |
| tree | f59f3b6c386134b7589829b06147e02382cf35ec | |
| parent | e91c49b747f5a643d27b664c32bfa4d13be18346 (diff) | |
use RETURNING syntax when creating base filter record during OPML import
| -rw-r--r-- | classes/OPML.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/classes/OPML.php b/classes/OPML.php index 1debc8623..bae00b8bc 100644 --- a/classes/OPML.php +++ b/classes/OPML.php @@ -397,14 +397,10 @@ class OPML extends Handler_Protected { //print "F: $title, $inverse, $enabled, $match_any_rule"; $sth = $this->pdo->prepare("INSERT INTO ttrss_filters2 (match_any_rule,enabled,inverse,title,owner_uid) - VALUES (?, ?, ?, ?, ?)"); + VALUES (?, ?, ?, ?, ?) RETURNING id"); $sth->execute([$match_any_rule, $enabled, $inverse, $title, $owner_uid]); - $sth = $this->pdo->prepare("SELECT MAX(id) AS id FROM ttrss_filters2 WHERE - owner_uid = ?"); - $sth->execute([$owner_uid]); - $row = $sth->fetch(); $filter_id = $row['id']; |