diff options
| author | 2013-11-26 23:52:53 +0100 | |
|---|---|---|
| committer | 2013-11-26 23:53:22 +0100 | |
| commit | 6130ba6157fc214579a0466ec122a8f085224415 (patch) | |
| tree | b095eedbf8b6c891c803b9487ce3e36552e73dd7 /app/models/Entry.php | |
| parent | b703099c1947d26764a8e936ecb9ea58e15fbd63 (diff) | |
SQL : utilisation de (id_feed, guid) pour l'unicité
Préparation avant
https://github.com/marienfressinaud/FreshRSS/issues/202
Diffstat (limited to 'app/models/Entry.php')
| -rwxr-xr-x | app/models/Entry.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/Entry.php b/app/models/Entry.php index e2493e266..abf381a9b 100755 --- a/app/models/Entry.php +++ b/app/models/Entry.php @@ -565,9 +565,9 @@ class EntryDAO extends Model_pdo { public function listByFeed ($feed, $state, $order = 'high_to_low', $limitFromId = '', $limitCount = '') { return $this->listWhere (' WHERE id_feed = ?', $state, $order, $limitFromId, $limitCount, array ($feed)); } - - public function listLastIdsByFeed($id, $n) { - $sql = 'SELECT id FROM ' . $this->prefix . 'entry WHERE id_feed=? ORDER BY date DESC LIMIT ' . intval($n); + + public function listLastGuidsByFeed($id, $n) { + $sql = 'SELECT guid FROM ' . $this->prefix . 'entry WHERE id_feed=? ORDER BY date DESC LIMIT ' . intval($n); $stm = $this->bd->prepare ($sql); $values = array ($id); $stm->execute ($values); |
