This commit is contained in:
tianshujie
2022-08-10 16:37:04 +08:00
parent 62edc91fd9
commit 5285fa44fe
+4 -5
View File
@@ -245,11 +245,10 @@ class build extends control
/* Get stories and stages. */
$storyPager = new pager($type == 'story' ? $recTotal : 0, $recPerPage, $type == 'story' ? $pageID : 1);
$stories = $this->dao->select('t1.*, t2.stage')->from(TABLE_STORY)->alias('t1')
->leftJoin(TABLE_STORYSTAGE)->alias('t2')->on('t1.id = t2.story')
->where('t1.id')->in($build->stories)
->andWhere('t1.deleted')->eq(0)
->beginIF($type == 'story')->orderBy("t1.$orderBy")->fi()
$stories = $this->dao->select('*')->from(TABLE_STORY)
->where('id')->in($build->stories)
->andWhere('deleted')->eq(0)
->beginIF($type == 'story')->orderBy($orderBy)->fi()
->page($storyPager)
->fetchAll('id');