31 $sth =
$dbh->prepare(
"INSERT INTO `crontabs` (`cli`, `request`, `user_id`, `shedule`, `method`, `headers`, `data`, `owner_group`, `note`, `run_at`) VALUES (:cli, :request, :user_id, :shedule, :method, :headers, :data, :owner_group, :note, :run_at)");
32 $sth->bindValue(
':cli',
$arr[
'cli']);
33 $sth->bindValue(
':request',
$arr[
'request']);
34 $sth->bindValue(
':user_id',
$arr[
'user_id']);
35 $sth->bindValue(
':shedule',
$arr[
'shedule']);
36 $sth->bindValue(
':method',
$arr[
'method']);
37 $sth->bindValue(
':headers',
$arr[
'headers']);
38 $sth->bindValue(
':data',
$arr[
'data']);
39 $sth->bindValue(
':owner_group',
$arr[
'owner_group']);
40 $sth->bindValue(
':note',
$arr[
'note']);
41 $sth->bindValue(
':run_at',
$arr[
'run_at']);
43 return $dbh->lastInsertId();
54 $sth =
$dbh->prepare(
"UPDATE `crontabs` SET `user_id` = :user_id WHERE `id` = :id");
55 $sth->bindValue(
':user_id',
$arr[
'user_id']);
58 if (
$sth->errorCode() ==
'00000') {
if(!($row=Wrong\Models\Crontabs::find($_POST['id']))) if(! $user->access() ->write($row)) $sth
Connect создает подключение к базе данных
static getInstance($ignore_error=false)
Controller контроллер для запросов к БД
Crontabs контроллер управления моделями крон задач, расширяет Controller.
static set_performer($arr)
ModelsInterface интерфейс управления моделями