diff options
author | immanuelfodor <[email protected]> | 2018-01-02 06:30:22 +0000 |
---|---|---|
committer | immanuelfodor <[email protected]> | 2018-01-02 06:30:22 +0000 |
commit | 09be7cdd73b20b5449678f352a2d710d4767e6b1 (patch) | |
tree | ca9865e289b16ee0c3cbf18bb6b77ec58a8860bc | |
parent | 2395dc3b04ee77035a2acd5a0e6cd9a787f7daf1 (diff) |
binding statement named param instead of positional replacement
-rw-r--r-- | classes/digest.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/classes/digest.php b/classes/digest.php index 83f39a865..75dda4984 100644 --- a/classes/digest.php +++ b/classes/digest.php @@ -132,12 +132,14 @@ class Digest ref_id = ttrss_entries.id AND feed_id = ttrss_feeds.id AND include_in_digest = true AND $interval_qpart - AND ttrss_user_entries.owner_uid = ? + AND ttrss_user_entries.owner_uid = :user_id AND unread = true AND score >= 0 ORDER BY ttrss_feed_categories.title, ttrss_feeds.title, score DESC, date_updated DESC - LIMIT ?"); - $sth->execute([$user_id, $limit]); + LIMIT :limit"); + $sth->bindParam(':user_id', intval($user_id, 10), \PDO::PARAM_INT); + $sth->bindParam(':limit', intval($limit, 10), \PDO::PARAM_INT); + $sth->execute(); $headlines_count = 0; $headlines = array(); |