61 if (!is_numeric(
$params[
'limit'])) {
62 throw new InvalidArgumentException(
'Please provide a valid numerical limit.');
65 if (!isset(
$params[
'offset'])) {
68 if (!is_numeric(
$params[
'offset'])) {
69 throw new InvalidArgumentException(
'Please provide a valid numerical offset.');
76 $where = strlen($where) ?
'WHERE ' . $where :
'';
77 $query =
"SELECT {$select} FROM {$from} {$where}";
80 $query .=
" GROUP BY {$group}";
83 if (strlen($having)) {
84 $query .=
" HAVING {$having}";
88 $query .=
" ORDER BY {$order}";
91 $res = $this->db->query($query);
92 while ($row = $this->db->fetchAssoc(
$res)) {
93 $data[
'items'][] = $row;
97 $cnt_sql =
"SELECT COUNT(*) cnt FROM ({$query}) subquery";
98 $row_cnt = $this->db->fetchAssoc($this->db->query($cnt_sql));
99 $data[
'cnt'] = $row_cnt[
'cnt'];
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getFromPart(array $params, array $filter)
getGroupByPart(array $params, array $filter)
__construct(ilDBInterface $db)
getWherePart(array $params, array $filter)
getHavingPart(array $params, array $filter)
getSelectPart(array $params, array $filter)
getList(array $params, array $filter)
getOrderByPart(array $params, array $filter)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params