diff --git a/module/build/model.php b/module/build/model.php index 3a51289f0b..241e46c134 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -189,8 +189,7 @@ class buildModel extends model { return $this->dao->select('*')->from(TABLE_BUILD) ->where('deleted')->eq(0) - ->andWhere('stories', true)->like("%,$storyID,%") - ->orWhere('stories')->like("%,$storyID")->markRight(1) + ->andWhere("CONCAT(stories, ',')")->like("%,$storyID,%") ->orderBy('id_desc') ->fetchAll('id'); } diff --git a/module/release/model.php b/module/release/model.php index 5a5653aaee..3e3695d16f 100644 --- a/module/release/model.php +++ b/module/release/model.php @@ -114,8 +114,7 @@ class releaseModel extends model { return $this->dao->select('*')->from(TABLE_RELEASE) ->where('deleted')->eq(0) - ->andWhere('stories', true)->like("%,$storyID,%") - ->orWhere('stories')->like("%,$storyID")->markRight(1) + ->andWhere("CONCAT(stories, ',')")->like("%,$storyID,%") ->orderBy('id_desc') ->fetchAll('id'); }