. */ use Util\Query; use Models\Module; include_once __DIR__.'/../../core.php'; $structure = Module::find((new Module())->getByName('Prima nota')->id_record); if (!empty($_SESSION['superselect']['mastrini'])) { $id_record = $_SESSION['superselect']['mastrini']; $where = 'co_movimenti.idmastrino IN ('.implode(',', $id_record).')'; $id_record = json_decode($righe); unset($_SESSION['superselect']['mastrini']); } else { $where = 'co_movimenti.idmastrino='.prepare($id_record); } // RISULTATI VISIBILI Query::setSegments(false); $query = Query::getQuery($structure, $where, 0, []); $query = Modules::replaceAdditionals($structure->id, $query); $query = str_replace('1=1', '1=1 AND '.$where, $query); $records = Query::executeAndCount($query); $campi = []; foreach ($records['results'][0] as $key => $value) { $campi[] = $key; } unset($campi[0]);