add correct abstract to seminary page

This commit is contained in:
coderkun 2014-03-19 00:49:19 +01:00
commit def8b192e1
4 changed files with 78 additions and 6 deletions

View file

@ -145,6 +145,32 @@
}
/**
* Get first texts of a Questgroup.
*
* @param int $questgroupId ID of a Questgroup
* @return array First Text of this Questgroup
*/
public function getFirstQuestgroupText($questgroupId)
{
$data = $this->db->query(
'SELECT id, pos, text '.
'FROM questgrouptexts '.
'WHERE questgroup_id = ? '.
'ORDER BY pos ASC '.
'LIMIT 1',
'i',
$questgroupId
);
if(!empty($data)) {
return $data[0];
}
return null;
}
/**
* Get the next Questgroup.
*