выборка моделей типа "cron задача". Подробнее...
Переменные | |
$table_name = basename($request) | |
$columns = ['id', 'threads', 'cli', 'request', 'user_id', 'shedule', 'method', 'headers', 'data', 'owner_group', 'run_at', 'note', 'act'] | |
$order_column = isset($_GET['order'][0]['column']) && isset($columns[$_GET['order'][0]['column']]) ? $columns[$_GET['order'][0]['column']] : $columns[0] | |
$order_dir = isset($_GET['order'][0]['dir']) && $_GET['order'][0]['dir'] == 'asc' ? 'ASC' : 'DESC' | |
$start = abs(intval($_GET['start'])) | |
$length = intval($_GET['length']) | |
$query = "SELECT " . implode(', ', $columns) . " FROM `$table_name` ORDER BY `$order_column` $order_dir" | |
$sth = $dbh->prepare($query) | |
$arr = $sth->fetchAll(PDO::FETCH_NUM) | |
$arr_filtered = $arr | |
if(!empty($_GET['search']['value'])) | $response = [] |
$response ['recordsTotal'] = count($arr) | |
$response ['recordsFiltered'] = $response['recordsTotal'] | |
$response ['recordsFiltered'] = count($arr_filtered) | |
$response ['data'] = array_slice($arr_filtered, $start, $length) | |
$response ['draw'] = abs(intval($_GET['draw'])) | |
выборка моделей типа "cron задача".
См. определение в файле crontabs.php
foreach ( $arr as $key=> $item) $arr = $sth->fetchAll(PDO::FETCH_NUM) |
См. определение в файле crontabs.php строка 25
$arr_filtered = $arr |
См. определение в файле crontabs.php строка 40
$columns = ['id', 'threads', 'cli', 'request', 'user_id', 'shedule', 'method', 'headers', 'data', 'owner_group', 'run_at', 'note', 'act'] |
См. определение в файле crontabs.php строка 14
$length = intval($_GET['length']) |
См. определение в файле crontabs.php строка 19
$order_column = isset($_GET['order'][0]['column']) && isset($columns[$_GET['order'][0]['column']]) ? $columns[$_GET['order'][0]['column']] : $columns[0] |
См. определение в файле crontabs.php строка 16
$order_dir = isset($_GET['order'][0]['dir']) && $_GET['order'][0]['dir'] == 'asc' ? 'ASC' : 'DESC' |
См. определение в файле crontabs.php строка 17
$query = "SELECT " . implode(', ', $columns) . " FROM `$table_name` ORDER BY `$order_column` $order_dir" |
См. определение в файле crontabs.php строка 21
if (!empty( $_GET[ 'search'][ 'value'])) $response = [] |
См. определение в файле crontabs.php строка 64
$response[ 'data'] = array_slice($arr_filtered, $start, $length) |
См. определение в файле crontabs.php строка 69
$response[ 'draw'] = abs(intval($_GET['draw'])) |
См. определение в файле crontabs.php строка 70
$response[ 'recordsFiltered'] = $response['recordsTotal'] |
См. определение в файле crontabs.php строка 66
$response[ 'recordsFiltered'] = count($arr_filtered) |
См. определение в файле crontabs.php строка 68
$response[ 'recordsTotal'] = count($arr) |
См. определение в файле crontabs.php строка 65
$start = abs(intval($_GET['start'])) |
См. определение в файле crontabs.php строка 18
$sth = $dbh->prepare($query) |
См. определение в файле crontabs.php строка 23
$table_name = basename($request) |
См. определение в файле crontabs.php строка 12