В чем ошибка xpdo set update?
Пытаюсь сделать при вызове скрипта, запись в базу через XPDO
напрямую в базу запрос тоже не принимает
напрямую в базу запрос тоже не принимает
public function prepareListQueryBeforeCount(xPDOQuery $c) {
$c = parent::prepareListQueryBeforeCount($c);
$c->select(array(
'lfvideoItem.id',
'c.mashine',
));
$c->innerJoin('LfvideoStatus', 'c','lfvideoItem.id = c.idjob');
$c->command('update');
$c->set(array(
'c.mashine' => '-1'
));
$c->where(array(
'status' => '-1'
));
$c->prepare();
print $c->toSQL();
$c->stmt->execute();
print_r($c->stmt->errorInfo());
return $c;
}
Выдает код без SETUPDATE `modx_lfvideo_items` JOIN `modx_lfvideo_status` `c` ON lfvideoItem.id = c.idjob WHERE `modx_lfvideo_items`.`status` = -1 Array
(
[0] => 42000
[1] => 1064
[2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `modx_lfvideo_items`.`status` = -1' at line 1
метод отсюда github.com/modxcms/revolution/blob/master/core/model/modx/rest/modrestcontroller.class.php#L451