Skip to content

Commit

Permalink
Fix SQL syntax error from missing space.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Dec 22, 2016
1 parent 5082523 commit 9dc4074
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions jonah/lib/Driver/Sql.php
Expand Up @@ -458,12 +458,11 @@ protected function _getStories($criteria, $order = Jonah::ORDER_PUBLISHED)

// Ensure any results are in the following story_id list.
if (!empty($criteria['ids'])) {
$sql .= 'AND stories.story_id IN ('
$sql .= ' AND stories.story_id IN ('
. implode(',', array_map(function($v) { return '?'; }, $criteria['ids']))
. ')';
$values = array_merge($values, $criteria['ids']);
}

switch ($order) {
case Jonah::ORDER_PUBLISHED:
$sql .= ' ORDER BY story_published DESC';
Expand Down

0 comments on commit 9dc4074

Please sign in to comment.