implement LibraryAgent
This commit is contained in:
parent
83f1464e03
commit
a16a22cb4f
8 changed files with 401 additions and 28 deletions
|
|
@ -325,6 +325,25 @@
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get all Quests that are linked to a Questtopic.
|
||||
*
|
||||
* @param int $questtopicId ID of Questtopic
|
||||
* @return array Quests for this Questtopic
|
||||
*/
|
||||
public function getQuestsForQuesttopic($questtopicId)
|
||||
{
|
||||
return $this->db->query(
|
||||
'SELECT DISTINCT quests.id, quests.questgroup_id, quests.questtype_id, quests.title, quests.url, quests.xps, quests.task, quests.right_text, quests.wrong_text, quests.questsmedia_id '.
|
||||
'FROM quests_questsubtopics '.
|
||||
'INNER JOIN quests ON quests.id = quests_questsubtopics.quest_id '.
|
||||
'WHERE quests_questsubtopics.questsubtopic_id = ?',
|
||||
'i',
|
||||
$questtopicId
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue