| 123456789101112131415161718192021222324252627282930 |
- <?php
- class EntityHandler
- {
- public function getEntities(): array
- {
- global $db;
- $result = [];
- $sql = "
- SELECT *
- FROM ".MAIN_DB_PREFIX."entity
- WHERE active=1
- ORDER BY label ASC
- ";
- $rows = $db->query($sql);
- if ($rows) {
- while ($row = $db->fetch_object($rows)) {
- $result[] = [
- 'id' => $row->rowid,
- 'label' => $row->label
- ];
- }
- }
- return $result;
- }
- }
|