diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-09-05 14:36:34 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-09-05 14:36:41 +0200 |
commit | efa881fd42c28adabb916650ea2b817effff71e8 (patch) | |
tree | d8ae976c572fd3ae282e73ceeafcefd21325d950 | |
parent | 37484b28aecbc0afcc5bb153e0940ea643c998f5 (diff) |
trying to fix delete older than threshold query
-rw-r--r-- | db/itemmapper.php | 4 | ||||
-rw-r--r-- | tests/unit/db/ItemMapperTest.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/db/itemmapper.php b/db/itemmapper.php index e66b8c166..0eec5f2cb 100644 --- a/db/itemmapper.php +++ b/db/itemmapper.php @@ -264,10 +264,10 @@ class ItemMapper extends Mapper implements IMapper { if($limit > 0) { $params = array($status, $row['feed_id']); - $sql = 'DELETE FROM `*PREFIX*news_items` `items` ' . + $sql = 'DELETE FROM `*PREFIX*news_items` ' . 'WHERE NOT ((`status` & ?) > 0) ' . 'AND `feed_id` = ? ' . - 'ORDER BY `items`.`id` ASC'; + 'ORDER BY `id` ASC'; $this->execute($sql, $params, $limit); } diff --git a/tests/unit/db/ItemMapperTest.php b/tests/unit/db/ItemMapperTest.php index fe1de517a..1dbe13cca 100644 --- a/tests/unit/db/ItemMapperTest.php +++ b/tests/unit/db/ItemMapperTest.php @@ -342,10 +342,10 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility { $row = array('feed_id' => 30, 'size' => 11); - $sql2 = 'DELETE FROM `*PREFIX*news_items` `items` ' . + $sql2 = 'DELETE FROM `*PREFIX*news_items` ' . 'WHERE NOT ((`status` & ?) > 0) ' . 'AND `feed_id` = ? ' . - 'ORDER BY `items`.`id` ASC'; + 'ORDER BY `id` ASC'; $params2 = array($status, 30); |