1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-29 01:00:00 +01:00
openstamanager/modules/categorie_documenti/ajax/select.php
2018-11-30 16:10:15 +01:00

23 lines
556 B
PHP

<?php
include_once __DIR__.'/../../../core.php';
switch ($resource) {
case 'categorie_documenti':
$query = 'SELECT id, descrizione FROM zz_documenti_categorie |where| ORDER BY descrizione ASC';
foreach ($elements as $element) {
$filter[] = 'zz_documenti_categorie.id='.prepare($element);
}
if (empty($filter)) {
$where[] = 'deleted_at IS NULL';
}
if (!empty($search)) {
$search_fields[] = 'descrizione LIKE '.prepare('%'.$search.'%');
}
break;
}