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

23 lines
536 B
PHP
Raw Normal View History

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