mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-08-06 22:27:42 +02:00
use RETURNING syntax when creating article record in share anything
This commit is contained in:
parent
9735ff83cc
commit
e91c49b747
@ -124,12 +124,9 @@ class Article extends Handler_Protected {
|
||||
$sth = $pdo->prepare("INSERT INTO ttrss_entries
|
||||
(title, guid, link, updated, content, content_hash, date_entered, date_updated)
|
||||
VALUES
|
||||
(?, ?, ?, NOW(), ?, ?, NOW(), NOW())");
|
||||
(?, ?, ?, NOW(), ?, ?, NOW(), NOW()) RETURNING id");
|
||||
$sth->execute([$title, $guid, $url, $content, $content_hash]);
|
||||
|
||||
$sth = $pdo->prepare("SELECT id FROM ttrss_entries WHERE guid = ?");
|
||||
$sth->execute([$guid]);
|
||||
|
||||
if ($row = $sth->fetch()) {
|
||||
$ref_id = $row["id"];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user