* get single dataset * @param int $id * @return array|bool * @throws Exception */
(int $id)
| 156 | * @throws Exception |
| 157 | */ |
| 158 | public function readOwn(int $id) { |
| 159 | $sql = $this->db->getQueryBuilder(); |
| 160 | $sql->from(self::TABLE_NAME)->select('*')->where($sql->expr()->eq('id', $sql->createNamedParameter($id))) |
| 161 | ->andWhere($sql->expr()->eq('user_id', $sql->createNamedParameter($this->userId)))->orderBy('parent', 'ASC') |
| 162 | ->addOrderBy('name', 'ASC'); |
| 163 | $statement = $sql->executeQuery(); |
| 164 | $result = $statement->fetch(); |
| 165 | $statement->closeCursor(); |
| 166 | return $result; |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * get single dataset |