Multimag  0.2.992
workernames.php
См. документацию.
1 <?php
2 
3 // MultiMag v0.2 - Complex sales system
4 //
5 // Copyright (C) 2005-2018, BlackLight, TND Team, http://tndproject.org
6 //
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
16 //
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 //
20 
21 namespace Models\LDO;
22 
25 
27  public function getData() {
28  global $db;
29  $sql = "SELECT `user_id`, `worker_real_name` FROM `users_worker_info` WHERE `worker`='1' ORDER by `user_id` ASC";
30  $result = '';
31  $a = array();
32  $res = $db->query($sql);
33  while ($line = $res->fetch_assoc()) {
34  $a[$line['user_id']] = $line['worker_real_name'];
35  }
36  return $a;
37  }
38 
39 }
$res
Definition: fixer.php:178
$result
Definition: api.php:36
$line
Definition: priceload.php:39
$db
Класс списка наименований сотрудников
Definition: workernames.php:24
Базовый класс для списков в данных, использующихся, в основном, для обработки ajax запросов ...
getData()
Получить данные
Definition: workernames.php:27