->
from('s_articles_categories_ro', 'categories'
) ->
andWhere('categories.articleID > :lastId'
) ->
andWhere('categories.categoryID = :categoryId'
) ->
setParameter(':categoryId',
$categoryId, PDO::PARAM_INT
) ->
setParameter(':lastId', 0, PDO::PARAM_INT
) ->
orderBy('categories.articleID'
);
if ($limit !== null
) { $query->
setMaxResults($limit);
} } else { $query =
$this->
createQuery($limit);
$query->
innerJoin('variant', 's_articles_categories_ro', 'categories', 'variant.articleID = categories.articleID'
) ->
andWhere('categories.categoryID = :categoryId'
) ->
setParameter(':categoryId',
$categoryId, PDO::PARAM_INT
);
} return new LastIdQuery($query);
} /**
* @deprecated in 5.6, will be removed in 5.7 without replacement.
*
* {@inheritdoc}
*/